From 608571cfa71589b367acb0d2327ed026ec321eaf Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 18 Nov 2017 03:42:44 +0100 Subject: [PATCH] Clean up Texture Converter stuff --- ...ture_Conversion_Table.csv => Conversion_Table.csv} | 0 tools/Texture_Converter.py | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) rename tools/{Texture_Conversion_Table.csv => Conversion_Table.csv} (100%) diff --git a/tools/Texture_Conversion_Table.csv b/tools/Conversion_Table.csv similarity index 100% rename from tools/Texture_Conversion_Table.csv rename to tools/Conversion_Table.csv diff --git a/tools/Texture_Converter.py b/tools/Texture_Converter.py index d2701bfb6..af809d83c 100755 --- a/tools/Texture_Converter.py +++ b/tools/Texture_Converter.py @@ -12,7 +12,7 @@ # # Usage (to be simplified later): # - Put extracted texture pack into $HOME/tmp/pp -# - Make sure the file “Texture_Conversion_Table.csv” is in the same directory as the script +# - Make sure the file “Conversion_Table.csv” is in the same directory as the script # - Run the script in its directory # - If everything worked, retrieve texture pack in New_MineClone_2_Texture_Pack/ @@ -28,6 +28,7 @@ home = os.environ["HOME"] mineclone2_path = home + "/.minetest/games/mineclone2" working_dir = os.getcwd() output_dir_name = "New_MineClone_2_Texture_Pack" +appname = "Texture_Converter.py" ### SETTINGS ### output_dir = working_dir @@ -46,7 +47,7 @@ verbose = False PXSIZE = 16 -syntax_help = """TextureConverter.py -i [-o ] [-d] [-v|-q] [-h] +syntax_help = appname+""" -i [-o ] [-d] [-v|-q] [-h] Mandatory argument: -i Directory of Minecraft resource pack to convert @@ -102,10 +103,10 @@ if base_dir == None: Mind-reading has not been implemented yet. Try this: - TextureConverter.py -i + """+appname+""" -i For the full help, use: - TextureConverter.py -h""") + """+appname+""" -h""") sys.exit(2); ### END OF SETTINGS ### @@ -130,7 +131,7 @@ def target_dir(directory): def convert_textures(): failed_conversions = 0 print("Texture conversion BEGINS NOW!") - with open("Texture_Conversion_Table.csv", newline="") as csvfile: + with open("Conversion_Table.csv", newline="") as csvfile: reader = csv.reader(csvfile, delimiter=",", quotechar='"') first_row = True for row in reader: