[Moin-user] How to use a wiki page as the shared_intermap in moin 1.3.5
robert.seeger at orsoft.de
Tue Oct 25 05:59:05 EDT 2005
> With 1.3+ you can just use a wget call to the raw action of the
> interwiki wiki page. Maybe using cron.
thanks for the info.
I'm an old Windows user who has not come near any Unix prompt since Linux
and the WWW were invented (I used to be an OS/2 freak for many years ;-)),
thus I'm not familiar with wget and don't like cron jobs etc. very much. I
prefer that my edit of a page has immediate effect.
However your mentioning of the raw action and wget pointed me in the right
direction and I tried a different solution inspired by a function in
MoinMoin\scripts\xmlrpc-tools\getmasterpages2 (I think it is yours?). It
seems to work well, but I haven't done much testing yet.
I created two wiki pages, one as a copy of moinmaster's InterWikiMap and one
with my (Intranet) additions. Then I simply put the http URL with the raw
action in shared_intermap:
Then I patched wikiutil.resolve_wiki:
for filename in intermap_files:
if filename and os.path.isfile(filename):
f = open(filename, "r")
elif filename and filename.startswith("http:"):
#maybe this is an URL to get a raw page?
pagedata = urllib.urlopen(filename).read()
I'm not sure about unicode and encoding issues, but at least page InterWiki
in any wiki of my farm now shows all my InterWiki additions.
Of course your solution using wget is much better from the performance point
Thanx and kind regards,
More information about the Moin-user