From 83a6fafd705cba9ffc59748c8a3c5e4df83317cf Mon Sep 17 00:00:00 2001 From: smerten Date: Sat, 22 Jun 2013 11:25:15 +0000 Subject: [PATCH] Added `README` and man page in `rst2graph.rst`. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7676 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- sandbox/rst2graph/README | 87 ++++++++++++++++++++++ sandbox/rst2graph/global.log | 34 +++++++++ sandbox/rst2graph/rst2graph.pod | 53 ------------- sandbox/rst2graph/rst2graph.rst | 73 ++++++++++++++++++ sandbox/rst2graph/tag.log | 2 +- .../rst2graph/tests/xmllint/input/titlePath.gxl | 1 + sandbox/rst2graph/version.py | 2 +- 7 files changed, 197 insertions(+), 55 deletions(-) create mode 100644 sandbox/rst2graph/README delete mode 100644 sandbox/rst2graph/rst2graph.pod create mode 100644 sandbox/rst2graph/rst2graph.rst create mode 120000 sandbox/rst2graph/tests/xmllint/input/titlePath.gxl diff --git a/sandbox/rst2graph/README b/sandbox/rst2graph/README new file mode 100644 index 000000000..1d461abba --- /dev/null +++ b/sandbox/rst2graph/README @@ -0,0 +1,87 @@ +.. -*- rst -*- + +==================== +README for rst2graph +==================== + +Overview +======== + +**rst2graph** is a program to create a graph from the links contained +in a reStructuredText file. This is useful if you use linking in your +text and want to visualize the link structure in a graphical form. + +**rst2graph** supports various output formats describing the resulting +graph in a certain formal syntax. So far Graphviz_ seems to be the +best tool to render the output to a graphical form. + +**rst2graph** offers a number of options to select only certain +portions from the reStructuredText file. Using these options you can +create the subgraph you are interested in. + +Installation +============ + +After you obtained and unpacked the package run something like :: + + python setup.py install + +After installation you have the following commands to render graphs +from reStructuredText: + +**rst2graph.py** + The generic renderer. You must give an explicit output format to + this command. + +**rst2gv.py**, **rst2dot.py** + Two commands rendering to dot_ format. + +**rst2gxl.py** + A command to render GXL_ format. + +Requirements +============ + +Beyond the docutils_ package you may want to install the pygraphviz_ +to render into dot_ output. + +This runs on Python 2.7. Python 3 has not been tested. + +Documentation +============= + +See http://www.merten-home.de/FreeSoftware/rst2graph/manual.html or +use **--help** for options. + +Tests +===== + +There are test suites in ``tests.tgz``. Use filterunit_ to run tests. + +Availability +============ + +**rst2graph** is available from + +http://www.merten-home.de/FreeSoftware/rst2graph/ + +and the Docutils sandbox + +http://svn.code.sf.net/p/docutils/code/trunk/sandbox/rst2graph + +History +======= + +**rst2graph** stems from **rst2gxl** which only supported the GXL_ +format. Because the **gxl2gv** converter malfunctioned too often and +since pygraphviz_ is available **rst2gxl** became the foundation for +**rst2graph** supporting the dot_ format directly. + +.. ########################################################################### + +.. _Graphviz: http://graphviz.org/ +.. _dot: http://www.graphviz.org/content/dot-language +.. _pygraphviz: http://networkx.lanl.gov/pygraphviz/ +.. _filterunit: http://www.merten-home.de/FreeSoftware/filterunit/ +.. _docutils: http://docutils.sourceforge.net/ +.. _GXL: http://www.gupro.de/GXL diff --git a/sandbox/rst2graph/global.log b/sandbox/rst2graph/global.log index 8cdd977ca..19d9dc79f 100644 --- a/sandbox/rst2graph/global.log +++ b/sandbox/rst2graph/global.log @@ -1,4 +1,38 @@ ************************************** +Date: Sat Jun 22 13:20:35 CEST 2013 +Author: stefan +Tag: rst2graph_1_53 + +-------------------------------------- +Update of /home/stefan/vault/sm/rst2graph +In directory eskebo:/home/stefan/free/rst2graph + +Added Files: + README + +-------------------------------------- +Log Message: +Added README. +************************************** +Date: Sun Jun 16 15:52:33 CEST 2013 +Author: stefan +Tag: rst2graph_1_52 + +-------------------------------------- +Update of /home/stefan/vault/sm/rst2graph +In directory eskebo:/home/stefan/free/rst2graph + +Modified Files: + Makefile +Added Files: + rst2graph.rst +Removed Files: + rst2graph.pod + +-------------------------------------- +Log Message: +Replaced `rst2graph.pod` by `rst2graph.rst`. +************************************** Date: Sat Jun 15 21:23:01 CEST 2013 Author: stefan Tag: rst2graph_1_51 diff --git a/sandbox/rst2graph/rst2graph.pod b/sandbox/rst2graph/rst2graph.pod deleted file mode 100644 index 29f8d6565..000000000 --- a/sandbox/rst2graph/rst2graph.pod +++ /dev/null @@ -1,53 +0,0 @@ -=head1 NAME - -rst2graph - Generate graphs from the links in a reStructuredText file - -=head1 SYNOPSIS - -B [I]... [I [I]] - -=head1 DESCRIPTION - -Translates a reStructuredText document to a graph in various -languages. Depending on the output format this can then be transformed -to a graphic for instance by B. - -=head1 OPTIONS - -Try - - rst2graph.py --help - -for an explanation of all options. - -=head1 SEE ALSO - -=over 4 - -=item Docutils - -http://docutils.sourceforge.net/ - -=item reStructuredText - -http://docutils.sourceforge.net/rst.html - -=item GXL - -http://www.gupro.de/GXL - -=item Graphviz - -http://graphviz.org/ - -=back - -=head1 AVAILABILITY - -B is available from - -http://www.merten-home.de/FreeSoftware/rst2graph/ - -and the Docutils sandbox - -svn://svn.code.sf.net/p/docutils/code/trunk/sandbox/rst2graph diff --git a/sandbox/rst2graph/rst2graph.rst b/sandbox/rst2graph/rst2graph.rst new file mode 100644 index 000000000..5743d8a5c --- /dev/null +++ b/sandbox/rst2graph/rst2graph.rst @@ -0,0 +1,73 @@ +========= +rst2graph +========= + +--------------------------------------------------------- +generate graphs from the links in a reStructuredText file +--------------------------------------------------------- + +:Author: smerten@oekonux.de +:Copyright: GPL v2 +:Manual section: 1 +:Manual group: text processing + +SYNOPSIS +======== + +**rst2graph.py** **--dot|--gv|--gxl** [*options*\]... [*reST* [*graph*\]] + +**rst2dot.py** [*options*\]... [*reST* [*dot-graph*\]] + +**rst2gv.py** [*options*\]... [*reST* [*dot-graph*\]] + +**rst2gxl.py** [*options*\]... [*reST* [*gxl-graph*\]] + +DESCRIPTION +=========== + +Translates a reStructuredText_ document to a graph in various +languages. This can then be transformed to a graphic for instance by +Graphviz_. + +OPTIONS +======= + +.. include:: docutilsOptions.rst + +SEE ALSO +======== + +.. _Docutils: + +* Docutils + + http://docutils.sourceforge.net/ + +.. _reStructuredText: + +* reStructuredText + + http://docutils.sourceforge.net/rst.html + +.. _GXL: + +* GXL + + http://www.gupro.de/GXL + +.. _Graphviz: + +* Graphviz + + http://graphviz.org/ + +AVAILABILITY +============ + +**rst2graph** is available from + +http://www.merten-home.de/FreeSoftware/rst2graph/ + +and the Docutils sandbox + +http://svn.code.sf.net/p/docutils/code/trunk/sandbox/rst2graph diff --git a/sandbox/rst2graph/tag.log b/sandbox/rst2graph/tag.log index 34647c8ee..85527e09d 100644 --- a/sandbox/rst2graph/tag.log +++ b/sandbox/rst2graph/tag.log @@ -1 +1 @@ -rst2graph_1_51 +rst2graph_1_53 diff --git a/sandbox/rst2graph/tests/xmllint/input/titlePath.gxl b/sandbox/rst2graph/tests/xmllint/input/titlePath.gxl new file mode 120000 index 000000000..0388af126 --- /dev/null +++ b/sandbox/rst2graph/tests/xmllint/input/titlePath.gxl @@ -0,0 +1 @@ +../../options/expected/titlePath.gxl \ No newline at end of file diff --git a/sandbox/rst2graph/version.py b/sandbox/rst2graph/version.py index 17cf2da40..db08d2f6f 100644 --- a/sandbox/rst2graph/version.py +++ b/sandbox/rst2graph/version.py @@ -1 +1 @@ -version = '1.2 +version = '1.2.1' -- 2.11.4.GIT