VisualSiteMap

Description

Inspired by the webdot.py action. Uses dot executable instead of webdot, since webdot doesn't work well on Windows boxes. Frequently linked pages are highlighted.

Version History

Action

Author

Email

Designed for MoinMoin Release...

Comment

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

Problems

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 2010-01-17 16:30:15 by adsl-243-167-106)