diff --git a/mspconvert.py b/mspconvert.py index 7a5b13d..9b68cc3 100755 --- a/mspconvert.py +++ b/mspconvert.py @@ -8,19 +8,24 @@ import sys print("MS Paint file converter utility v0.1") -print("Written by A.M. Rowsell, MPL Version 2.0 license\n\n") -if len(sys.argv) < 1: +print("Written by A.M. Rowsell, MPL Version 2.0 license\n") +if len(sys.argv) < 2: print("Please provide filename (without extension)!") + print("Example usage:\n./mspconvert.py DONUT") + sys.exit(255) filename = sys.argv[1] width = 0 height = 0 +# The output file follows the very simple XBM format +# which is just a basic C syntax array variable outputString = ''' #define {0}_width {1} #define {0}_height {2} static unsigned char {0}_bits [] = ''' +# Output data starts as an empty bytearray outputData = b'' try: