diff --git a/df2vtt_parser.py b/df2vtt_parser.py index 59fe240..002a47b 100644 --- a/df2vtt_parser.py +++ b/df2vtt_parser.py @@ -17,6 +17,9 @@ import fg_module import utilib +name = "DungeonFog FG Module Generator" +version = "v1.2" + verbose = False log_file = False def vprint(msg): @@ -535,11 +538,8 @@ def get_choice_by_name(name: str): vprint("Skipped cleanup due to arguments") print(module_id + "." + options['extension']) -name = "DungeonFog FG Module Generator" -version = "v1.2" - def get_argparse(): - parser = argparse.ArgumentParser(description="Converts one or more df2vtt files into a Fantasy Grounds module.") + parser = argparse.ArgumentParser(description=name + " " + version + " - Converts one or more df2vtt files into a Fantasy Grounds module.") parser.add_argument('module_name', metavar='M', type=str, help="The module name as shown within Fantasy Grounds. Also used as the filename.") parser.add_argument('files', metavar='F', nargs='+', help="One or more paths to df2vtt files to parse into a module.") parser.add_argument('-a', dest='author', default='DungeonFog', help="Set a custom module author. (Default: DungeonFog)") @@ -571,6 +571,9 @@ def do_args(arg_list): verbose = args.verbose log_file = args.log_to_file + print("Application starting") + print(name + " " + version) + options = { "refine_portals": args.refine_portals, "door_width": args.door_width, diff --git a/parser_gui.py b/parser_gui.py index 2bed323..a401f7c 100644 --- a/parser_gui.py +++ b/parser_gui.py @@ -11,6 +11,8 @@ import re import webbrowser +print(parser.name + " " + parser.version) + if len(sys.argv) > 1: print("Arguments present. Running in command line mode. (Run without arguments to run in GUI mode.)") parser.do_args(sys.argv) @@ -145,7 +147,7 @@ def query_input(query): ] # Create the Window -window = gui.Window('DungeonFog to Fantasy Grounds Module Generator', layout, finalize=True) +window = gui.Window(parser.name + " " + parser.version, layout, finalize=True) window["link_about"].set_cursor("hand2") win_about = None