Commit 54a8aa73 authored by Carsten Emde's avatar Carsten Emde
Browse files

Revised help text and updated README accordingly

parent d594cc47
......@@ -38,27 +38,26 @@ Copyright 2021 - Open Source Automation Development Lab (OSADL) eG, author Carst
* Usage
```shell
generatecypher.py [-h] [-c FILE] [-d DIR] [-f] [-o FORMAT] [-s DIR] [-t FILE] [-v]
generatecypher.py [-c FILE] [-d DIR] [-f] [-h] [-o FORMAT] [-p FONT] [-s DIR] [-t FILE] [-v] [-x]
```
* Explanations
```shell
-h, --help show this help message and exit
-c FILE, --config FILE
path to configuration file (required)
-d DIR, --directory DIR
path to directory to scan (required)
-f, --flat do not recurse through directories to scan
-f, --flat no recursion through directories to scan
-h, --help show this message and quit
-o FORMAT, --outputformat FORMAT
output format 'cypher', 'gexf', 'gv' or 'text', default 'gv'
-p FONT, --fontname FONT
name of the font to be used throughout the document ('gv' only)
-s DIR, --skipdirs DIR
exclude directories from being scanned
exclude directories from being scanned (comma-separated list)
-t FILE, --targets FILE
only examine file or comma-separated list of files
only examine files (comma-separated list)
-v, --verbose show the name of the file the program is currently analyzing
-x, --symbols include symbols and their relations (default when format is 'cypher')
-v, --verbose be more verbose about what the program is actually doing
```
# Selection of individual targets and directories to scan
......
......@@ -458,17 +458,19 @@ def createoutput(outputdir, outputformat, machine_to_binary, linked_libraries,
outputfileopen.write("\n}\n")
def main(argv):
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(add_help=False)
# the following options are provided on the commandline
# the following switches and options are provided on the commandline
parser.add_argument("-c", "--config", action="store", dest="cfg",
help="path to configuration file", metavar="FILE")
help="path to configuration file (required)", metavar="FILE")
parser.add_argument("-d", "--directory", action="store",
dest="dirtoscan",
help="path to directory to scan", metavar="DIR")
help="path to directory to scan (required)", metavar="DIR")
parser.add_argument("-f", "--flat", action="store_true",
dest="flat",
help="do not recurse through directories to scan")
help="no recursion through directories to scan")
parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS,
help='show this message and quit')
parser.add_argument("-o", "--outputformat", action="store",
dest="outputformat",
help="output format 'cypher', 'gexf', 'gv' or 'text', default 'gv'",
......@@ -479,16 +481,16 @@ def main(argv):
metavar="FONT")
parser.add_argument("-s", "--skipdirs", action="store",
dest="skipdirs",
help="exclude directories from being scanned", metavar="DIR")
help="exclude directories from being scanned (comma-separated list)", metavar="DIR")
parser.add_argument("-t", "--targets", action="store",
dest="targets",
help="only examine file or comma-separated list of files", metavar="FILE")
help="only examine files (comma-separated list)", metavar="FILE")
parser.add_argument("-v", "--verbose", action="store_true",
dest="verbose", default=False,
help="show the name of the file the program is currently analyzing")
parser.add_argument("-x", "--symbols", action="store_true",
dest="forcesymbols", default=False,
help="include symbols and their relations (default when format is 'cypher')")
parser.add_argument("-v", "--verbose", action="store_true",
dest="verbose", default=False,
help="be more verbose about what the program is actually doing")
args = parser.parse_args()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment