Giter Site home page Giter Site logo

dokuwiki-grapher's Introduction

DokuWiki Grapher

This is a simple script to generate a directed graph description from DokuWiki link structures. Read the introductional blog post for some more info.

Installing

Download the grapher.php file into your DokuWiki bin directory. Then run it from command line.

Usage

See bin/grapher.php --help:

USAGE: grapher.php <OPTIONS> [<namespaces>]

  Creates a graph representation of pages and media files and how they    
  are interlinked.                                                        
                                                                          

  OPTIONS

  -d <depth>, --depth Recursion depth, eg. how deep to look into the      
  <depth>             given namespaces. Use 0 for all. Default: 1         

  -m <ns|all|none>,   How to handle media files. 'ns' includes only media 
  --media             that is located in the given namespaces, 'all'      
  <ns|all|none>       includes all media files and 'none' ignores the     
                      media files completely. Default: ns                 

  -f <dot|gexf>,      The wanted output format. 'dot' is a very simple    
  --format <dot|gexf> format which can be used to visualize the resulting 
                      graph with graphviz. The 'gexf' format is a more    
                      complex XML-based format which contains more info   
                      about the found nodes and can be loaded in Gephi.   
                      Default: dot                                        

  -o <file>, --output Where to store the output eg. a filename. If not    
  <file>              given the output is written to STDOUT.              

  --no-colors         Do not use any colors in output. Useful when piping 
                      output to other tools or files.                     

  -h, --help          Display this help screen and exit immeadiately.     


  <namespaces>        Give all wiki namespaces you want to have graphed.  
                      If no namespace is given, the root namespace is     
                      assumed.

Visualize

Run the created file through GraphViz or Gephi.

dokuwiki-grapher's People

Contributors

cyrille37 avatar splitbrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dokuwiki-grapher's Issues

Some changes and it works fine with actual dokuwiki (I think)

I am a total newie and I was trying the grapher.php in my dokuwiki (Release 2022-07-31a "Igor") but it did not work. I looked around and, after changing things as said after, it looks to work fine.
As indicated in phpcli, I put :

use splitbrain\phpcli\CLI;
use splitbrain\phpcli\Options;

class Grapher extends CLI {...

And I changed :

$namespaces = array_map('cleanID', $options->args);
for
$namespaces = array_map('cleanID', $options->getArgs());

I attached the file in case is any good.

grapher (1).zip

'inc/cliopts.php' is missing

Grapher doesn't work with current dokuwiki version (Release 2016-06-26a "Elenor of Tsort").

web73@webhost:~/web/bin$ ./grapher.php 
PHP Warning:  require_once(/var/www/clients/client15/web73/web/inc/cliopts.php): failed to open stream: No such file or directory in /var/www/clients/client15/web73/web/bin/grapher.php on line 8
PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client15/web73/web/inc/cliopts.php' (include_path='/var/www/clients/client15/web73/web/lib/plugins/authgoogle/google:.:/usr/share/php:/usr/share/pear') in /var/www/clients/client15/web73/web/bin/grapher.php on line 8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.