From: Neil Date: Sat, 5 Mar 2016 16:45:25 +0000 (+0200) Subject: Make level convertor take arguments X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=9391cb7e3c8087e39334f3e88c3c19c32b4151fb;p=koperkapel.git Make level convertor take arguments --- diff --git a/koperkapel/levels/l2 b/koperkapel/levels/l2 deleted file mode 100644 index d53575e..0000000 --- a/koperkapel/levels/l2 +++ /dev/null @@ -1,5 +0,0 @@ -wwwwwwwwww -wffffffffw -wsgffgfffw -wffffffffw -wwwwwwwwww \ No newline at end of file diff --git a/koperkapel/levels/level_converter.py b/koperkapel/levels/level_converter.py index 8949de6..f03bd3e 100644 --- a/koperkapel/levels/level_converter.py +++ b/koperkapel/levels/level_converter.py @@ -1,5 +1,6 @@ import os import json +import sys ATTRIBUTE_MAP = { ' ': {'floor': {'base': 'floor', @@ -96,4 +97,8 @@ class level_generator: if __name__ == '__main__': l = level_generator() - l.convert('l2', 't2') + if len(sys.argv) != 3: + print("Usage %s " % sys.argv[0]) + #l.convert('l2', 't2') + else: + l.convert(sys.argv[1], sys.argv[2]) diff --git a/koperkapel/levels/t2 b/koperkapel/levels/t2 deleted file mode 100644 index f401896..0000000 --- a/koperkapel/levels/t2 +++ /dev/null @@ -1,5 +0,0 @@ -tttttttttt -tttttttttt -tt-----ttt -tttttttttt -tttttttttt \ No newline at end of file