VisualSiteMap

Description

Create a graph of interlinked wiki pages within a given range starting from the current page (based on Graphviz). Frequently linked pages are highlighted.

Version History

Action

Author

Email

Designed for MoinMoin Release...

Comment

VisualSiteMap_1.10.py

sumpfralle

<devel AT KLAMMERAFFE sumpfralle DOT de>

1.9.8

fixed broken links in SVG output

VisualSiteMap_1.9.py

sumpfralle

<devel AT KLAMMERAFFE sumpfralle DOT de>

1.9.4

Adapted to 1.9.4, configurable links

VisualSiteMap_1.3.py

ThomasLorenz

<LorenzTh AT KLAMMERAFFE web DOT de>

1.3(.4)

Adapted to 1.3.4, fixed utf-8 node names, fixed sub pages. Rename to VisualSiteMap.py before deployment.

VisualSiteMap_1.2.py

ThomasLorenz

<LorenzTh AT KLAMMERAFFE web DOT de>

1.2.x

New version with improved features. Rename to VisualSiteMap.py before deployment.

VisualSiteMap.py

ThomasLorenz

<LorenzTh AT KLAMMERAFFE web DOT de>

1.1

Installation

  1. download the most current version
  2. store the file as VisualSiteMap.py in the plugin/action directory of your wiki

  3. create a directory where the plugin may store its output (dot/png/svg files) and hand it over to the user running the wiki:

    mkdir -p /var/cache/moin
    chown -R www-data. /var/cache/moin
  4. add the following line to your webserver (apache?) configuration and restart the webserver:

    Alias /moin_cache/ /var/cache/moin/
  5. take a look at the following interesting configuration settings in the action file:
    • DEPTH_CONTROL
    • OUTPUT_FORMAT
    • DEFAULT_DEPTH
    • MAX_DEPTH
    • LINK_TO_SITEMAP
  6. choose Actions -> Visual Site Map in one of your wiki pages

  7. enjoy!

Issues

Compatibility with MoinMoin 1.8 (Action version 1.3)

CACHE_DIR = "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/cache"
CACHE_URL = "https://nv1402/cache"
DOT_EXE = "D:/Program Files/Graphviz2.24/bin/dot.exe"

Here is my error Msg:
AttributeError
'Request' object has no attribute 'http_headers'
If you want to report a bug, please save this page and attach it to your bug report.
Show debugging information Report bug Visit MoinMoin wiki

I am getting following error msg when i go to my front page and select VisualSiteMap from action list.
2nd error msg:
IOError
[Errno 2] No such file or directory: 'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/cache\\Welcome(20)To(20)Info(20)Wiki_2.cmap'
If you want to report a bug, please save this page and attach it to your bug report.
Dated: 10.09.2009

possible answers/ideas

Using desktop version 1.8.6, python 2.5, Windows XP and help from George Dinwiddie I made the following changes to visualsitemap.py

Configuration changes:

CACHE_DIR = "F:\\moin-1.8.6\\wiki\\htdocs\\cache" - double slashes to handle the "\" escape issue

CACHE_URL = "http://localhost:8080/moin_static186/cache"

DOT_EXE = "D:\\Program Files\\Graphviz2.26\\bin\\neato.exe" - double slash thing again

Code changes:

From: import re, os
To: import re, os, subprocess

From: request.http_headers()
To: request.emit_http_headers()

From: wikiutil.send_title(request, _('Visual Map of %s') % pagename, pagename=pagename)
To: request.theme.send_title(_('Visual Site Map for "%s"') % (pagename), pagename=pagename)

From: dotfile = file(dotfilename, 'w')
To: os.umask(022)

From: os.system('%s -T%s -o"%s" "%s"' % (DOT_EXE, OUTPUT_FORMAT, imagefilename, dotfilename))

To: subprocess.call('%s -T%s -o"%s" "%s"' % (DOT_EXE, OUTPUT_FORMAT, imagefilename, dotfilename))

From: wikiutil.send_footer(request, pagename)
To: request.theme.send_footer(pagename)

And visualsitemap works. Way cool


MoinMoin: ActionMarket/VisualSiteMap (last edited 2015-08-30 21:03:55 by v22014112486721426)