Commit 53d386cb authored by Carsten Emde's avatar Carsten Emde
Browse files

Expanded and fixed help output, adapted README.md accordingly

parent 8b9a45c0
......@@ -20,8 +20,8 @@ The scripts can output in several formats. Currently supported:
# Nice to have
* Graphviz
* Gephi
* Graphviz
* Neo4J (tested with 3.4.9 community edition) to load the resulting Cypher files
# License
......@@ -48,7 +48,10 @@ Copyright 2021 - Open Source Automation Development Lab (OSADL) eG, author Carst
path to directory to scan
-o FORMAT, --outputformat FORMAT
output format, default 'cypher'
output format 'cypher', 'gexf', 'gv' or 'text', default 'gv'
-s DIR, --skipdirs DIR
exclude directories from being scanned
-t FILE, --targets FILE
only examine file or comma-separated list of files
......@@ -57,7 +60,32 @@ Copyright 2021 - Open Source Automation Development Lab (OSADL) eG, author Carst
# Scope
* Only when output format is 'cypher' all symbols with related exporters and users are included, in all other output formats only links are considered
Only when output format is 'cypher' all symbols with related exporters and users
are included in the output, in all other output formats only links are considered
# Getting Gephi (tested with version 0.9.2)
Get Gephi from
https://gephi.org/users/download/
and follow the installation instructions
# Getting Graphviz (tested with version 2.42.4)
Graphviz in included in nearly all popular Linux distributions. The recommended
binary is 'dot'; it mus be executed in a subsequent step to convert the
callgraph output into one of the supported display formats such as PDF or SVG,
e.g.
dot -Tpdf callgraph-output.gv >gv-display.pdf
dot -Tsvg callgraph-output.gv >gv-display.svg
In addition, it is possible to select different font name and size using command
line options, e.g.
dot -Nfontname=Korolev -Nfontsize=16 -Tpdf callgraph-output.gv >/tmp/gv-display.pdf
# Getting Neo4J
......
......@@ -347,10 +347,11 @@ def main(argv):
help="do not recurse through directories to scan")
parser.add_argument("-o", "--outputformat", action="store",
dest="outputformat",
help="output format, default 'cypher'", metavar="FORMAT")
help="output format 'cypher', 'gexf', 'gv' or 'text', default 'gv'",
metavar="FORMAT")
parser.add_argument("-s", "--skipdirs", action="store",
dest="skipdirs",
help="exclude directories from bein scanned", metavar="DIR")
help="exclude directories from being scanned", metavar="DIR")
parser.add_argument("-t", "--targets", action="store",
dest="targets",
help="only examine file or comma-separated list of files", metavar="FILE")
......@@ -379,8 +380,8 @@ def main(argv):
supported_formats = ['cypher', 'gexf', 'gv', 'text']
# check the output format. By default it is cypher.
outputformat = 'cypher'
# check the output format. By default it is graphviz.
outputformat = 'gv'
if args.outputformat is not None:
if args.outputformat not in supported_formats:
parser.error("Unsupported output format %s, may only be one of %s" % (args.outputformat, supported_formats))
......
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