Attachment 'documentation.patch'
Download 1 diff -u moin-1.6.orig/MoinMoin/script/__init__.py moin-1.6/MoinMoin/script/__init__.py
2 --- moin-1.6.orig/MoinMoin/script/__init__.py 2007-12-12 05:19:45.000000000 +0200
3 +++ moin-1.6/MoinMoin/script/__init__.py 2007-12-30 02:09:14.000000000 +0200
4 @@ -112,7 +112,7 @@
5
6 self.parser = optparse.OptionParser(
7 usage="%(cmd)s [command] %(usage)s" % {'cmd': os.path.basename(sys.argv[0]), 'usage': usage, },
8 - version=rev)
9 + version=rev, add_help_option=False)
10 self.parser.allow_interspersed_args = False
11 if def_values:
12 self.parser.set_defaults(**def_values.__dict__)
13 @@ -170,6 +170,11 @@
14 "--page", dest="page", default='',
15 help="wiki page name [default: all pages]"
16 )
17 + self.parser.add_option(
18 + "-h", "--help",
19 + action="store_true", dest="help",
20 + help="Print informational messages."
21 + )
22
23 def init_request(self):
24 """ create request """
25 @@ -242,5 +247,7 @@
26 plugin_class = wikiutil.importBuiltinPlugin('script.%s' % cmd_module, cmd_name, 'PluginScript')
27 except wikiutil.PluginMissingError:
28 fatal("Command plugin %r, command %r was not found." % (cmd_module, cmd_name))
29 + if self.options.help:
30 + print plugin_class.__doc__
31 plugin_class(args[2:], self.options).run() # all starts again there
32
33 diff -u moin-1.6.orig/MoinMoin/script/account/check.py moin-1.6/MoinMoin/script/account/check.py
34 --- moin-1.6.orig/MoinMoin/script/account/check.py 2007-12-12 05:19:45.000000000 +0200
35 +++ moin-1.6/MoinMoin/script/account/check.py 2007-12-30 20:10:19.000000000 +0200
36 @@ -1,35 +1,51 @@
37 # -*- coding: iso-8859-1 -*-
38 -"""
39 - MoinMoin - check / process user accounts
40 +
41 +# ----------------------------------------------------------------------------
42 +# if a user subsribes to magicpages, it means that he wants to keep
43 +# exactly THIS account - this will avoid deleting it.
44 +magicpages = [
45 + "ThisAccountIsCorrect",
46 + "DieserAccountIstRichtig",
47 +]
48
49 - @copyright: 2003-2006 MoinMoin:ThomasWaldmann
50 - @license: GNU GPL, see COPYING for details.
51 +# ----------------------------------------------------------------------------
52 +
53 +import os, sys
54 +
55 +from MoinMoin.script import MoinScript
56 +from MoinMoin import user, wikiutil
57
58 - Why is this needed?
59 - ===================
60 - When using ACLs, a wiki user name has to be unique, there must not be
61 - multiple accounts having the same username. The problem is, that this
62 - was possible before the introduction of ACLs and many users, who forgot
63 - their ID, simply created a new ID using the same user name.
64 -
65 - Because access rights (when using ACLs) depend on the NAME (not the ID),
66 - this must be cleaned up before using ACLs or users will have difficulties
67 - changing settings and saving their account data (system won't accept the
68 - save, if the user name and email is not unique).
69 +class PluginScript(MoinScript):
70 + """MoinMoin - check / process user accounts
71
72 - How to use this tool?
73 - =====================
74 +@copyright: 2003-2006 MoinMoin:ThomasWaldmann
75 +@license: GNU GPL, see COPYING for details.
76 +
77 +Purpose:
78 +========
79 +When using ACLs, a wiki user name has to be unique, there must not be
80 +multiple accounts having the same username. The problem is, that this
81 +was possible before the introduction of ACLs and many users, who forgot
82 +their ID, simply created a new ID using the same user name.
83 +
84 +Because access rights (when using ACLs) depend on the NAME (not the ID),
85 +this must be cleaned up before using ACLs or users will have difficulties
86 +changing settings and saving their account data (system won't accept the
87 +save, if the user name and email is not unique).
88 +
89 +Detailed Instructions:
90 +======================
91 +
92 +General syntax: moin [options] account check [check-options]
93 +
94 +[options] usually should be:
95 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
96 +
97 +[check-options] see below:
98
99 - General syntax: moin [options] account check [check-options]
100 -
101 - [options] usually should be:
102 - --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
103 -
104 - [check-options] see below:
105 -
106 0. Check the settings at top of the code!
107 Making a backup of your wiki might be also a great idea.
108 -
109 +
110 1. Best is to first look at duplicate user names:
111 moin ... account check --usersunique
112
113 @@ -47,29 +63,12 @@
114
115 4. After cleaning up, do 1. and 2. again. There should be no output now, if
116 everything is OK.
117 -
118 +
119 5. Optionally you may want to make wikinames out of the user names
120 moin ... account check --wikinames
121 moin ... account check --wikinames --save
122 -
123 """
124
125 -# ----------------------------------------------------------------------------
126 -# if a user subsribes to magicpages, it means that he wants to keep
127 -# exactly THIS account - this will avoid deleting it.
128 -magicpages = [
129 - "ThisAccountIsCorrect",
130 - "DieserAccountIstRichtig",
131 -]
132 -
133 -# ----------------------------------------------------------------------------
134 -
135 -import os, sys
136 -
137 -from MoinMoin.script import MoinScript
138 -from MoinMoin import user, wikiutil
139 -
140 -class PluginScript(MoinScript):
141 def __init__(self, argv, def_values):
142 MoinScript.__init__(self, argv, def_values)
143 self._addFlag("usersunique",
144 diff -u moin-1.6.orig/MoinMoin/script/account/create.py moin-1.6/MoinMoin/script/account/create.py
145 --- moin-1.6.orig/MoinMoin/script/account/create.py 2007-12-12 05:19:45.000000000 +0200
146 +++ moin-1.6/MoinMoin/script/account/create.py 2007-12-30 20:10:40.000000000 +0200
147 @@ -1,14 +1,35 @@
148 # -*- coding: iso-8859-1 -*-
149 -"""
150 - MoinMoin - create a user account
151 -
152 - @copyright: 2006 MoinMoin:ThomasWaldmann
153 - @license: GNU GPL, see COPYING for details.
154 -"""
155 -
156 from MoinMoin.script import MoinScript
157
158 class PluginScript(MoinScript):
159 + """MoinMoin - create a user account
160 +
161 +@copyright: 2006 MoinMoin:ThomasWaldmann
162 +@license: GNU GPL, see COPYING for details.
163 +
164 +Purpose:
165 +========
166 +This tool allows you to create user accounts via a command line interface.
167 +
168 +Detailed Instructions:
169 +======================
170 +General syntax: moin [options] account create [create-options]
171 +
172 +[options] usually should be:
173 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
174 +
175 +[create-options] see below:
176 + 0. Verify that the account does not exist.
177 + Currently this script does not check if the user exists.
178 +
179 + 1. Verify that you have specified the right options.
180 + This script does no verification of email addresses or the like.
181 +
182 + 2. To create a normal user 'JohnSmith' with an alias of 'JSmith' and an
183 + email of 'john@smith.com'
184 + moin ... account create --name JohnSmith --alias JSmith --email john@smith.com
185 +"""
186 +
187 def __init__(self, argv, def_values):
188 MoinScript.__init__(self, argv, def_values)
189 self.parser.add_option(
190 diff -u moin-1.6.orig/MoinMoin/script/account/disable.py moin-1.6/MoinMoin/script/account/disable.py
191 --- moin-1.6.orig/MoinMoin/script/account/disable.py 2007-12-12 05:19:45.000000000 +0200
192 +++ moin-1.6/MoinMoin/script/account/disable.py 2007-12-30 20:11:12.000000000 +0200
193 @@ -1,14 +1,37 @@
194 # -*- coding: iso-8859-1 -*-
195 -"""
196 - MoinMoin - disable a user account
197 -
198 - @copyright: 2006 MoinMoin:ThomasWaldmann
199 - @license: GNU GPL, see COPYING for details.
200 -"""
201 -
202 from MoinMoin.script import MoinScript
203
204 class PluginScript(MoinScript):
205 + """MoinMoin - disable a user account
206 +
207 +@copyright: 2006 MoinMoin:ThomasWaldmann
208 +@license: GNU GPL, see COPYING for details.
209 +
210 +Purpose:
211 +========
212 +This tool allows you to disable user accounts via a command line interface.
213 +
214 +Detailed Instructions:
215 +======================
216 +General syntax: moin [options] account disable [disable-options]
217 +
218 +[options] usually should be:
219 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
220 +
221 +[disable-options] see below:
222 + 0. Verify that you really want to disable the account.
223 + While there is a disable script, no such enable script exists.
224 +
225 + 1. If using usernames, verify that multiple usernames with the same
226 + user ID do not exist.
227 +
228 + 2. To disable the user 'JohnSmith':
229 + moin ... account disable --name JohnSmith
230 +
231 + 3. To disable the user 'JohnSmith', based on his UID '1198872910.78.56322':
232 + moin ... account disable --uid 1198872910.78.56322
233 +"""
234 +
235 def __init__(self, argv, def_values):
236 MoinScript.__init__(self, argv, def_values)
237 self.parser.add_option(
238 diff -u moin-1.6.orig/MoinMoin/script/cli/show.py moin-1.6/MoinMoin/script/cli/show.py
239 --- moin-1.6.orig/MoinMoin/script/cli/show.py 2007-12-12 05:19:45.000000000 +0200
240 +++ moin-1.6/MoinMoin/script/cli/show.py 2007-12-30 20:20:00.000000000 +0200
241 @@ -1,17 +1,23 @@
242 # -*- coding: iso-8859-1 -*-
243 -"""
244 - MoinMoin - cli show script
245 +from MoinMoin.script import MoinScript
246
247 - Just run a CLI request and show the output.
248 +class PluginScript(MoinScript):
249 + """MoinMoin - cli show script
250
251 - @copyright: 2006 MoinMoin:ThomasWaldmann
252 - @license: GNU GPL, see COPYING for details.
253 -"""
254 +@copyright: 2006 MoinMoin:ThomasWaldmann
255 +@license: GNU GPL, see COPYING for details.
256
257 -from MoinMoin.script import MoinScript
258 +Purpose:
259 +========
260 +Just run a CLI request and show the output.
261
262 -class PluginScript(MoinScript):
263 - """ show page script class """
264 +Detailed Instructions:
265 +======================
266 +General syntax: moin [options] cli show
267 +
268 +[options] usually should be:
269 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
270 +"""
271
272 def __init__(self, argv, def_values):
273 MoinScript.__init__(self, argv, def_values)
274 diff -u moin-1.6.orig/MoinMoin/script/export/dump.py moin-1.6/MoinMoin/script/export/dump.py
275 --- moin-1.6.orig/MoinMoin/script/export/dump.py 2007-12-12 05:19:45.000000000 +0200
276 +++ moin-1.6/MoinMoin/script/export/dump.py 2007-12-30 20:12:25.000000000 +0200
277 @@ -1,16 +1,4 @@
278 # -*- coding: iso-8859-1 -*-
279 -"""
280 - MoinMoin - Dump a MoinMoin wiki to static pages
281 -
282 - You must run this script as owner of the wiki files, usually this is the
283 - web server user.
284 -
285 - @copyright: 2002-2004 Juergen Hermann <jh@web.de>,
286 - 2005-2006 MoinMoin:ThomasWaldmann
287 - @license: GNU GPL, see COPYING for details.
288 -
289 -"""
290 -
291 import sys, os, time, codecs, shutil, re, errno
292
293 from MoinMoin import config, wikiutil, Page, user
294 @@ -95,7 +83,34 @@
295
296
297 class PluginScript(script.MoinScript):
298 - """ Dump script class """
299 + """MoinMoin - Dump a MoinMoin wiki to static pages
300 +
301 +@copyright: 2002-2004 Juergen Hermann <jh@web.de>,
302 + 2005-2006 MoinMoin:ThomasWaldmann
303 +@license: GNU GPL, see COPYING for details.
304 +
305 +Purpose:
306 +========
307 +This tool allows you to dump MoinMoin wiki pages to static HTML files.
308 +
309 +Detailed Instructions:
310 +======================
311 +General syntax: moin [options] export dump [dump-options]
312 +
313 +[options] usually should be:
314 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
315 +
316 +[dump-options] see below:
317 + 0. You must run this script as owner of the wiki files, usually this is the
318 + web server user.
319 +
320 + 1. To dump all the pages on the wiki to the directory '/mywiki'
321 + moin ... export dump --target-dir=/mywiki
322 +
323 + 2. To dump all the pages readable by 'JohnSmith' on the wiki to the directory
324 + '/mywiki'
325 + moin ... export dump --target-dir=/mywiki --username JohnSmith
326 +"""
327
328 def __init__(self, argv=None, def_values=None):
329 script.MoinScript.__init__(self, argv, def_values)
330 diff -u moin-1.6.orig/MoinMoin/script/export/package.py moin-1.6/MoinMoin/script/export/package.py
331 --- moin-1.6.orig/MoinMoin/script/export/package.py 2007-12-12 05:19:45.000000000 +0200
332 +++ moin-1.6/MoinMoin/script/export/package.py 2007-12-30 22:49:32.000000000 +0200
333 @@ -1,17 +1,4 @@
334 # -*- coding: iso-8859-1 -*-
335 -"""
336 - MoinMoin - Create a MoinMoin package from wiki pages specified.
337 -
338 - You must run this script as owner of the wiki files, usually this is the
339 - web server user.
340 -
341 - @copyright: 2002-2004 Juergen Hermann <jh@web.de>,
342 - 2005-2006 MoinMoin:ThomasWaldmann,
343 - 2007 Federico Lorenzi
344 - @license: GNU GPL, see COPYING for details.
345 -
346 -"""
347 -
348 import codecs, errno, os, re, shutil, sys, time
349
350 from MoinMoin import config, wikiutil, Page, user
351 @@ -19,7 +6,40 @@
352
353
354 class PluginScript(script.MoinScript):
355 - """ Create package class """
356 + """MoinMoin - Create a MoinMoin package from wiki pages specified.
357 +
358 +@copyright: 2002-2004 Juergen Hermann <jh@web.de>
359 + 2005-2006 MoinMoin:ThomasWaldmann,
360 + 2007 Federico Lorenzi
361 +@license: GNU GPL, see COPYING for details.
362 +
363 +Purpose:
364 +========
365 +This tool allows you to create a package of certain wiki pages.
366 +
367 +Detailed Instructions:
368 +======================
369 +General syntax: moin [options] export package [package-options]
370 +
371 +[options] usually should be:
372 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
373 +
374 +[package-options] see below:
375 + 0. You must run this script as owner of the wiki files, usually this is the
376 + web server user.
377 +
378 + 1. To package all non-system and non-underlay pages on a wiki to the file '~/mywiki.zip'
379 + moin ... export package --output ~/mywiki.zip
380 +
381 + 2. To package the pages 'FooBar' and 'TestPage' on a wiki to the file '~/mywiki.zip'
382 + moin ... export package --pages FooBar,TestPage --output ~/mywiki.zip
383 +
384 + 3. To package all pages matching the search term 'MoinMoin' on a wiki to the file '~/mywiki.zip'
385 + moin ... export package --search MoinMoin --output ~/mywiki.zip
386 +
387 + 4. Optionally, the --user argument could be added to any of the above examples,
388 + causing the script to respect ACLs.
389 +"""
390
391 def __init__(self, argv=None, def_values=None):
392 script.MoinScript.__init__(self, argv, def_values)
393 diff -u moin-1.6.orig/MoinMoin/script/import/irclog.py moin-1.6/MoinMoin/script/import/irclog.py
394 --- moin-1.6.orig/MoinMoin/script/import/irclog.py 2007-12-12 05:19:45.000000000 +0200
395 +++ moin-1.6/MoinMoin/script/import/irclog.py 2007-12-30 20:14:35.000000000 +0200
396 @@ -1,20 +1,4 @@
397 # -*- coding: iso-8859-1 -*-
398 -"""
399 - MoinMoin - Push files into the wiki.
400 -
401 - This script pushes files from a directory into the wiki (to be exact: it
402 - pushes all except the last file, as this is maybe still written to in
403 - case of irc logs).
404 - One application is to use it to store IRC logs into the wiki.
405 -
406 - Usage:
407 - moin --config-dir=... --wiki-url=... import irclog --author=IrcLogImporter --file-dir=.
408 -
409 - @copyright: 2005-2007 MoinMoin:AlexanderSchremmer
410 - 2006 MoinMoin:ThomasWaldmann
411 - @license: GNU GPL, see COPYING for details.
412 -"""
413 -
414 # this function generates a pagename from the file name
415 def filename_function(filename):
416 filename = filename.lstrip('#')
417 @@ -43,7 +27,30 @@
418
419
420 class PluginScript(MoinScript):
421 - """ irclog importer script class """
422 + """MoinMoin - Push files into the wiki.
423 +
424 +@copyright: 2005-2007 MoinMoin:AlexanderSchremmer
425 + 2006 MoinMoin:ThomasWaldmann
426 +@license: GNU GPL, see COPYING for details.
427 +
428 +Purpose:
429 +========
430 +This script pushes files from a directory into the wiki (to be exact: it
431 +pushes all except the last file, as this is maybe still written to in
432 +case of irc logs).
433 +One application is to use it to store IRC logs into the wiki.
434 +
435 +Detailed Instructions:
436 +======================
437 +General syntax: moin [options] import irclog [irclog-options]
438 +
439 +[options] usually should be:
440 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
441 +
442 +[irclog-options] see below:
443 + 0. To add all the files in the current directory to the wiki as the user 'JohnSmith'
444 + moin ... import irclog --author=JohnSmirh --file-dir=.
445 +"""
446
447 def __init__(self, argv, def_values):
448 MoinScript.__init__(self, argv, def_values)
449 diff -u moin-1.6.orig/MoinMoin/script/index/build.py moin-1.6/MoinMoin/script/index/build.py
450 --- moin-1.6.orig/MoinMoin/script/index/build.py 2007-12-12 05:19:45.000000000 +0200
451 +++ moin-1.6/MoinMoin/script/index/build.py 2007-12-30 20:15:10.000000000 +0200
452 @@ -1,18 +1,36 @@
453 # -*- coding: iso-8859-1 -*-
454 -"""
455 - MoinMoin - build xapian search engine's index
456 +from MoinMoin.script import MoinScript
457
458 - You must run this script as owner of the wiki files, usually this is the
459 - web server user.
460 +class IndexScript(MoinScript):
461 + """MoinMoin - build xapian search engine's index
462
463 - @copyright: 2006 MoinMoin:ThomasWaldmann
464 - @license: GNU GPL, see COPYING for details.
465 -"""
466 +@copyright: 2006 MoinMoin:ThomasWaldmann
467 +@license: GNU GPL, see COPYING for details.
468
469 -from MoinMoin.script import MoinScript
470 +Purpose:
471 +========
472 +This tool allows you to control xapian's index of Moin.
473
474 -class IndexScript(MoinScript):
475 - """ Xapian general index script class """
476 +Detailed Instructions:
477 +======================
478 +General syntax: moin [options] index build [build-options]
479 +
480 +[options] usually should be:
481 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
482 +
483 +[build-options] see below:
484 + 0. You must run this script as owner of the wiki files, usually this is the
485 + web server user.
486 +
487 + 1. To add the files from '/files.lst' to the index
488 + moin ... index build --files /files.lst --mode add
489 +
490 + 2. To update the index with the files from '/files.lst'
491 + moin ... index build --files /files.lst --mode update
492 +
493 + 3. To rebuild the index with the files from '/files.lst'
494 + moin ... index build --files /files.lst --mode rebuild
495 +"""
496
497 def __init__(self, argv, def_values):
498 MoinScript.__init__(self, argv, def_values)
499 diff -u moin-1.6.orig/MoinMoin/script/xmlrpc/mailimport.py moin-1.6/MoinMoin/script/xmlrpc/mailimport.py
500 --- moin-1.6.orig/MoinMoin/script/xmlrpc/mailimport.py 2007-12-12 05:19:45.000000000 +0200
501 +++ moin-1.6/MoinMoin/script/xmlrpc/mailimport.py 2007-12-30 20:17:24.000000000 +0200
502 @@ -1,13 +1,4 @@
503 # -*- coding: iso-8859-1 -*-
504 -"""
505 - MoinMoin - MailImport script
506 -
507 - Imports a mail into the wiki.
508 -
509 - @copyright: 2006 MoinMoin:AlexanderSchremmer
510 - @license: GNU GPL, see COPYING for details.
511 -"""
512 -
513 import sys
514 import xmlrpclib
515
516 @@ -16,7 +7,30 @@
517 input = sys.stdin
518
519 class PluginScript(MoinScript):
520 - """ Mail Importer """
521 + """MoinMoin - MailImport script
522 +
523 +@copyright: 2006 MoinMoin:AlexanderSchremmer
524 +@license: GNU GPL, see COPYING for details.
525 +
526 +Purpose:
527 +========
528 +This tool allows you to import mail into the wiki.
529 +
530 +Detailed Instructions:
531 +======================
532 +General syntax: moin [options] maint mailimport [mailimport-options]
533 +
534 +[options] usually should be:
535 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
536 +
537 +[mailimport-options] see below:
538 + 0. Verify that you have a mailimportconf.py configuration file.
539 +
540 + 1. To import mail from the file '/mymail'
541 + moin ... xmlrpc mailimport << /mymail
542 + OR
543 + cat /mymail | moin ... xmlrpc mailimport
544 +"""
545
546 def __init__(self, argv, def_values):
547 MoinScript.__init__(self, argv, def_values)
548 diff -u moin-1.6.orig/MoinMoin/script/xmlrpc/remote.py moin-1.6/MoinMoin/script/xmlrpc/remote.py
549 --- moin-1.6.orig/MoinMoin/script/xmlrpc/remote.py 2007-12-12 05:19:45.000000000 +0200
550 +++ moin-1.6/MoinMoin/script/xmlrpc/remote.py 2007-12-30 21:00:16.000000000 +0200
551 @@ -1,20 +1,32 @@
552 # -*- coding: iso-8859-1 -*-
553 -"""
554 - MoinMoin - remote command execution, client part
555 -
556 - This can be used as client to execute moin scripts remotely.
557 -
558 - @copyright: 2006 MoinMoin:ThomasWaldmann
559 - @license: GNU GPL, see COPYING for details.
560 -"""
561 -
562 import sys
563 import xmlrpclib
564
565 from MoinMoin.script import MoinScript, fatal
566
567 class PluginScript(MoinScript):
568 - """ Remote Script Execution Client """
569 + """MoinMoin - remote command execution, client part
570 +
571 +@copyright: 2006 MoinMoin:ThomasWaldmann
572 +@license: GNU GPL, see COPYING for details.
573 +
574 +Purpose:
575 +========
576 +This tool allows you to execute moin scripts remotely.
577 +
578 +Detailed Instructions:
579 +======================
580 +General syntax: moin [options] xmlrpc remote [remote-options]
581 +
582 +[options] usually should be:
583 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
584 +
585 +[remote-options] see below:
586 + 0. Verify that you have a remotescriptconf.py configuration file.
587 +
588 + 1. To run the script 'account check' remotely.
589 + moin ... xmlrpc remote account check
590 +"""
591
592 def __init__(self, argv, def_values):
593 MoinScript.__init__(self, argv, def_values)
594 diff -u moin-1.6.orig/MoinMoin/script/xmlrpc/retrieve.py moin-1.6/MoinMoin/script/xmlrpc/retrieve.py
595 --- moin-1.6.orig/MoinMoin/script/xmlrpc/retrieve.py 2007-12-12 05:19:45.000000000 +0200
596 +++ moin-1.6/MoinMoin/script/xmlrpc/retrieve.py 2007-12-30 21:06:55.000000000 +0200
597 @@ -1,16 +1,31 @@
598 # -*- coding: iso-8859-1 -*-
599 -"""
600 - MoinMoin - page contents retriever
601 -
602 - @copyright: 2007 MoinMoin:JohannesBerg
603 - @license: GNU GPL, see COPYING for details.
604 -"""
605 -
606 import xmlrpclib
607
608 from MoinMoin.script import MoinScript
609
610 class PluginScript(MoinScript):
611 + """MoinMoin - page contents retriever
612 +
613 +@copyright: 2006 MoinMoin:ThomasWaldmann
614 +@license: GNU GPL, see COPYING for details.
615 +
616 +Purpose:
617 +========
618 +This tool allows you to print out the contents of a page via xmlrpc.
619 +
620 +Detailed Instructions:
621 +======================
622 +General syntax: moin [options] xmlrpc retrieve [retrieve-options]
623 +
624 +[options] usually should be:
625 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
626 +
627 +[retrieve-options] see below:
628 + 0. To retrieve the page 'FrontPage' from the wiki '192.168.0.1' which is
629 + running xmlrpc
630 + moin ... xmlrpc retrieve 192.168.0.1 FrontPage
631 +"""
632 +
633 def __init__(self, argv, def_values):
634 MoinScript.__init__(self, argv, def_values)
635 self.argv = argv
636 diff -u moin-1.6.orig/MoinMoin/script/xmlrpc/write.py moin-1.6/MoinMoin/script/xmlrpc/write.py
637 --- moin-1.6.orig/MoinMoin/script/xmlrpc/write.py 2007-12-12 05:19:45.000000000 +0200
638 +++ moin-1.6/MoinMoin/script/xmlrpc/write.py 2007-12-30 21:28:40.000000000 +0200
639 @@ -1,13 +1,4 @@
640 # -*- coding: iso-8859-1 -*-
641 -"""
642 - MoinMoin - page contents writer
643 -
644 - Commented example of how to edit a page with xmlrpc.
645 -
646 - @copyright: 2007 MoinMoin:JohannesBerg
647 - @license: GNU GPL, see COPYING for details.
648 -"""
649 -
650 import xmlrpclib
651 import sys
652
653 @@ -15,6 +6,32 @@
654 from MoinMoin.support.multicall import MultiCall
655
656 class PluginScript(MoinScript):
657 + """MoinMoin - page contents writer
658 +
659 + @copyright: 2007 MoinMoin:JohannesBerg
660 + @license: GNU GPL, see COPYING for details.
661 +
662 +Purpose:
663 +========
664 +This tool allows you to edit a page with xmlrpc. It is more of a commented
665 +example then an actual script.
666 +
667 +Detailed Instructions:
668 +======================
669 +General syntax: moin [options] xmlrpc write [write-options]
670 +
671 +[options] usually should be:
672 + --config-dir=/path/to/my/cfg/ --wiki-url=wiki.example.org/
673 +
674 +[write-options] see below:
675 + 0. To edit the page 'FrontPage' on '192.168.0.1' using the username
676 + 'JohnSmith' and the password 'MyPass', changing the page contents
677 + to 'This will be the new contents of the page!'
678 + moin ... xmlrpc write 192.168.0.1 JohnSmith MyPass FrontPage
679 + This will be the new contents of the page!
680 + ^D
681 +"""
682 +
683 def __init__(self, argv, def_values):
684 MoinScript.__init__(self, argv, def_values)
685 self.argv = argv
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.