This command line tool allows you to create graph representations of pages and media files in one or more given namespaces. Links between the pages and media files are represented as edges of the graph.
Graphs are exported either in dot format as understood by Graphviz or in GEXF format as understood by Gephi.
Download the grapher.php file and place it in the bin directory of your DokuWiki installation.
Usage: grapher.php <options> [<namespaces>]
Creates a graph representation of pages and media files and how they
are interlinked
OPTIONS
-h, --help show this help and exit
-d, --depth <num> recursion depth. 0 for all. default: 1
-f, --format (dot|gexf) output format, default: dot
-m, --media (ns|all|none) how to handle media files. default: ns
-o, --output <file> where to store the output. default: STDOUT
NAMESPACES
Give all wiki namespaces you want to have graphed. If no namespace
is given, the root namespace is assumed.
By default the script will not recurse into deeper namespaces. Eg. if you say namespace foo, namespace foo:bar will not be included. When setting –depth 0 all lower namespaces will be included. Using a number will define the maximum recursion level.
There are three different ways how media files can be handled:
ns - This is the default. All media files in the given namespace(s) will be added as nodes. When pages use the images, an edge will be created. This is the best mode to spot orphaned images and files.all - This will add all images that are linked from the pages found in the given namespaces. Images are added as nodes even if they are from different namespaces. But only linked images are added, no orphans.none - No images will be added at all