Attachment 'MoinDigest876.txt'
Download 1 Discussion about InterWikiMap maintenance on moin-user list
2
3 #871
4
5 From: "Robert Seeger" <robert.seeger@orsoft.de>
6 To: <moin-user@lists.sourceforge.net>
7 Subject: [Moin-user] How to use a wiki page as the shared_intermap in moin 1.3.5?
8
9 Dear MoinMoin Masters,
10 I'm still in the migration from 1.1 to 1.3.5 and am puzzled with regard to
11 InterWiki configuration.
12
13 In 1.1. you could easily use shared_intermap to point to a text file that
14 was also a wiki page, as pages had a static file name an location. This was
15 described in the HelpMiscellaneous for 1.1.:
16
17 If you want your users to easily add new InterWiki monikers, change your
18 moin_config.py to contain an entry like this:
19
20 shared_intermap = ['/usr/local/moin/mywiki/data/text/intermap_2etxt']
21
22 Then create a page named intermap.txt (see intermap.txt for an example)
23 with the following content:
24 ....
25
26
27 This allowed easy maintenance of interwiki definitions in the usual Wiki
28 way.
29 As we use InterWiki a lot to make our IntraNet flexible (not only for
30 various wikis in a farm, but also to bug trackers, databases, file server,
31 mail repository...) this is a very convenient way.
32
33 Now in 1.3.5 we have a completely different physical storage of the pages
34 and each revision gets a different file name, so I'm not sure how it is now
35 possible to point to the newest revision.
36
37 As I've seen the central http://moinmoin.wikiwikiweb.de/InterWikiMap I was
38 wondering if you serve the InterWiki directly from there?
39 If 'Yes' then I would like to know how you do this by configuration?
40 If 'No' then I will think about a way to patch this in
41 wikiutil.resolve_wiki - should not be too difficult. I am thinking alog the
42 line of
43
44 if filename.startswith("wiki:"):
45 #parse page instead of file
46
47 I live in the Windows/NTFS world, so "wiki:" could never be the start of a
48 valid file name, but how about other os/filesystems? Or should I better
49 introduce a second config parameter?
50
51 Kind Regards,
52
53 Robert Seeger
54
55 #876
56
57 From: Thomas Waldmann <tw-public@gmx.de>
58 To: moin-user@lists.sourceforge.net
59 Subject: Re: [Moin-user] How to use a wiki page as the shared_intermap in
60 moin 1.3.5?
61
62 Hi Robert,
63
64 > In 1.1. you could easily use shared_intermap to point to a text file
65
66 You can do that with 1.3.5, too, but ...
67
68 > was also a wiki page, as pages had a static file name an location.
69
70 ... this isn't any more the case.
71
72 > This allowed easy maintenance of interwiki definitions in the usual Wiki
73 > way.
74
75 With 1.3+ you can just use a wget call to the raw action of the
76 interwiki wiki page. Maybe using cron.
77
78 > As I've seen the central http://moinmoin.wikiwikiweb.de/InterWikiMap I was
79 > wondering if you serve the InterWiki directly from there?
80
81 We use wget to make the dist version of the file.
82
83 > If 'Yes' then I would like to know how you do this by configuration?
84 > If 'No' then I will think about a way to patch this in
85 > wikiutil.resolve_wiki - should not be too difficult. I am thinking alog the
86 > line of
87 >
88 > if filename.startswith("wiki:"):
89 > #parse page instead of file
90
91 The point why I didn't already do that, is that using a local file is
92 worse for a wiki farm than using a (common) file.
93
94 greetings,
95
96 Thomas
97
98 #877
99
100 From: "Robert Seeger" <robert.seeger@orsoft.de>
101 To: <moin-user@lists.sourceforge.net>
102 Subject: Re: [Moin-user] How to use a wiki page as the shared_intermap in moin 1.3.5
103 Date: Tue, 25 Oct 2005 15:07:21 +0200
104
105 Hi Thomas,
106 >
107 > With 1.3+ you can just use a wget call to the raw action of the
108 > interwiki wiki page. Maybe using cron.
109 >
110 thanks for the info.
111 I'm an old Windows user who has not come near any Unix prompt since Linux
112 and the WWW were invented (I used to be an OS/2 freak for many years ;-)),
113 thus I'm not familiar with wget and don't like cron jobs etc. very much. I
114 prefer that my edit of a page has immediate effect.
115 However your mentioning of the raw action and wget pointed me in the right
116 direction and I tried a different solution inspired by a function in
117 MoinMoin\scripts\xmlrpc-tools\getmasterpages2 (I think it is yours?). It
118 seems to work well, but I haven't done much testing yet.
119
120 I created two wiki pages, one as a copy of moinmaster's InterWikiMap and one
121 with my (Intranet) additions. Then I simply put the http URL with the raw
122 action in shared_intermap:
123
124 shared_intermap =
125 ['http://ors-x-know/master13cgi/moin.cgi/InterWikiMap?action=raw','http://or
126 s-x-know/master13cgi/moin.cgi/InterWikiMapOrs?action=raw']
127
128
129 Then I patched wikiutil.resolve_wiki:
130
131 for filename in intermap_files:
132 if filename and os.path.isfile(filename):
133 f = open(filename, "r")
134 lines.extend(f.readlines())
135 f.close()
136 #RS
137 elif filename and filename.startswith("http:"):
138 #maybe this is an URL to get a raw page?
139 pagedata = urllib.urlopen(filename).read()
140 lines.extend(pagedata.split("\n"))
141 #RS end
142
143 I'm not sure about unicode and encoding issues, but at least page InterWiki
144 in any wiki of my farm now shows all my InterWiki additions.
145 Of course your solution using wget is much better from the performance point
146 of view.
147
148 Thanx and kind regards,
149 Robert
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.