Add script to unify card file format (\n as linebreak, always trailing newline).

This commit is contained in:
elcnesh
2014-06-27 23:04:36 +00:00
parent 495517c765
commit bc486d4091
2 changed files with 12 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -16594,6 +16594,7 @@ forge-gui/tools/assignSetInfo.py svneol=native#text/x-python
forge-gui/tools/cardTemplateScript.py svneol=native#text/x-python
forge-gui/tools/deckAiCompat.py -text
forge-gui/tools/extractSetInfo.py -text
forge-gui/tools/formatCards -text
forge-gui/tools/formats.txt -text
forge-gui/tools/guilds.xlsx -text
forge-gui/tools/missingPreconFiles.py -text

11
forge-gui/tools/formatCards Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
CARDSFOLDER="../res/cardsfolder/"
for d in `ls -1 "$CARDSFOLDER"`; do
for f in `ls -1 "$CARDSFOLDER/$d"`; do
FILE="$CARDSFOLDER/$d/$f";
dos2unix "$FILE";
[[ -f "$FILE" && $(tail -c1 "$FILE") ]] && echo '' >> "$FILE" && echo "Appended trailing newline to $FILE";
done
done