diff options
-rwxr-xr-x | client/add-git-attributes | 2 | ||||
-rwxr-xr-x | client/edit-all-to-export-tilesets.sh | 19 | ||||
-rwxr-xr-x | client/list-tileset-order | 15 |
3 files changed, 36 insertions, 0 deletions
diff --git a/client/add-git-attributes b/client/add-git-attributes new file mode 100755 index 0000000..80cc30c --- /dev/null +++ b/client/add-git-attributes @@ -0,0 +1,2 @@ +#!/bin/sh +git config diff.csv2tsv.textconv 'sed s/,/\\t/g' diff --git a/client/edit-all-to-export-tilesets.sh b/client/edit-all-to-export-tilesets.sh new file mode 100755 index 0000000..7be3411 --- /dev/null +++ b/client/edit-all-to-export-tilesets.sh @@ -0,0 +1,19 @@ +#!/bin/bash +for MAP in $(ls maps | grep '\.tmx$') +do + TILESETS=$( + grep '<tileset' "maps/$MAP" | + while read TILESET + do + TILESET=${TILESET#*name=\"} + TILESET=${TILESET%%\"*} + echo tilesets/${TILESET}.tsx + done + ) + rm -f ${TILESETS} + (cd tilesets; tiled ../maps/$MAP;) + git add -N tilesets/ + git add --patch +done + + diff --git a/client/list-tileset-order b/client/list-tileset-order new file mode 100755 index 0000000..b8d3f85 --- /dev/null +++ b/client/list-tileset-order @@ -0,0 +1,15 @@ +#!/bin/bash +DIR=${1:-maps} +for MAP in $(ls "$DIR" | grep '\.tmx$' ) +do + echo -n "${MAP%.tmx}:" + grep '<tileset' "$DIR/$MAP" | + while read TILESET + do + TILESET=${TILESET#*source=\"} + TILESET=${TILESET%%.tsx\"*} + TILESET=${TILESET##*/} + echo -n " $TILESET" + done + echo +done |