Skip to content

Commit

Permalink
display version in -h as well
Browse files Browse the repository at this point in the history
add some terminal based help
  • Loading branch information
teuben committed Oct 3, 2023
1 parent 0ce776b commit e777ee0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions qtrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
import subprocess

_version = "29-sep-2023"
_version = "3-oct-2023"
_debug = False

class MainWindow(QtWidgets.QMainWindow):
Expand Down Expand Up @@ -145,7 +145,12 @@ def quit(self):
self.close()

def help(self):
print('help')
print("Run: run the script withe the selected `key=val` arguments")
print("Save: save the key=val settings in a key file for later retrieval")
print("Load: load a keyfile previously saved")
print("Quit: quit the program")
print("Help: this help")
print("Hover with the mouse over the keyword names to get some help on the keywords")

# function to create each widget from the input file
def createWidgetsFromGroups(self):
Expand Down Expand Up @@ -349,8 +354,12 @@ def parsefile(file):

if __name__ == '__main__':
global args # global to access args outside
parser = argparse.ArgumentParser(description="Dynamic GUI Builder")
parser.add_argument("input_file", help="Text file containing `key=val` parameters, optionally add a keyfile", default=None, nargs='*')
parser = argparse.ArgumentParser(description="Dynamic GUI Builder - version %s" % _version,
formatter_class=argparse.RawTextHelpFormatter)

parser.add_argument("input_file", help="Script containing `key=val` parameters and #> GUI directives\n" +
"optionally add a keyfile [not implemented yet]",
default=None, nargs='*')
parser.add_argument('-d', '--debug', action='store_true', help='Enable debug mode')
parser.add_argument('-v', '--version', action='store_true', help='Show version')

Expand Down

0 comments on commit e777ee0

Please sign in to comment.