Revision: 4948 Author: wikipedian Date: 2008-01-30 10:17:03 +0000 (Wed, 30 Jan 2008)
Log Message: ----------- applied patch [ 1880834 ] add standard doc for genFactory.handleArg() by AndreasJS
Modified Paths: -------------- trunk/pywikipedia/add_text.py trunk/pywikipedia/blockpageschecker.py trunk/pywikipedia/inline_images.py trunk/pywikipedia/lonelypages.py
Modified: trunk/pywikipedia/add_text.py =================================================================== --- trunk/pywikipedia/add_text.py 2008-01-29 15:37:34 UTC (rev 4947) +++ trunk/pywikipedia/add_text.py 2008-01-30 10:17:03 UTC (rev 4948) @@ -3,26 +3,12 @@ """ This is a Bot written by Filnik to add a text in a given category.
---- GenFactory Generator is used --- --start Define from which page should the Bot start --ref Use the ref as generator --cat Use a category as generator --filelinks Use all the links to an image as generator --unusedfiles --unwatched --withoutinterwiki --interwiki --file --uncatfiles --uncatcat --uncat --subcat --transcludes Use all the page that transclude a certain page as generator --weblink Use the pages with a certain web link as generator --links Use the links from a certain page as generator --regex Only work on pages whose titles match the given regex +These command line parameters can be used to specify which pages to work on:
---- Other parameters --- +¶ms; + +Furthermore, the following command line parameters are supported: + -page Use a page as generator -text Define which text add -summary Define the summary to use @@ -60,6 +46,12 @@ import re, pagegenerators, urllib2, urllib import wikipedia, catlib
+# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { + '¶ms;': pagegenerators.parameterHelp, +} + msg = { 'en': u'Bot: Adding %s', 'he': u'בוט: מוסיף %s',
Modified: trunk/pywikipedia/blockpageschecker.py =================================================================== --- trunk/pywikipedia/blockpageschecker.py 2008-01-29 15:37:34 UTC (rev 4947) +++ trunk/pywikipedia/blockpageschecker.py 2008-01-30 10:17:03 UTC (rev 4948) @@ -8,15 +8,29 @@
Parameters:
+These command line parameters can be used to specify which pages to work on: + +¶ms; + +-xml Retrieve information from a local XML dump (pages-articles + or pages-meta-current, see http://download.wikimedia.org). + Argument can also be given as "-xml:filename". + +-page Only edit a specific page. + Argument can also be given as "-page:pagetitle". You can + give this parameter multiple times to edit multiple pages. + + +Furthermore, the following command line parameters are supported: + -always Doesn't ask every time if the bot should make the change or not, do it always. + -debug When the bot can't delete the template from the page (wrong regex or something like that) it will ask you if it should open the page on your browser. (attention: pages included may give false positives..) --page Work only on one page + -move The bot will check if the page is blocked also for the move option, not only for edit
-Note: This script uses also genfactory, you can use those generator as default. - --- Warning! --- You have to edit this script in order to add your preferences otherwise the script won't work! @@ -43,6 +57,12 @@ import re, webbrowser import wikipedia, catlib, pagegenerators, config
+# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { + '¶ms;': pagegenerators.parameterHelp, +} + ####################################################### #--------------------- PREFERENCES -------------------# ################### -- Edit below! -- #################
Modified: trunk/pywikipedia/inline_images.py =================================================================== --- trunk/pywikipedia/inline_images.py 2008-01-29 15:37:34 UTC (rev 4947) +++ trunk/pywikipedia/inline_images.py 2008-01-30 10:17:03 UTC (rev 4948) @@ -10,28 +10,14 @@ It is especially useful when you intend to disable the inline linking feature.
-This script understands various command-line arguments: +These command line parameters can be used to specify which pages to work on:
- -start: used as -start:page_name, specifies that the robot should - go alphabetically through all pages on the home wiki, - starting at the named page. +¶ms;
- -file: used as -file:file_name, read a list of pages to treat - from the named textfile. Page titles should be enclosed - in [[double-squared brackets]]. +-xml Retrieve information from a local XML dump (pages-articles + or pages-meta-current, see http://download.wikimedia.org). + Argument can also be given as "-xml:filename".
- -ref: used as -start:page_name, specifies that the robot should - touch all pages referring to the named page. - - -links: used as -links:page_name, specifies that the robot should - touch all pages referred to from the named page. - - -cat: used as -cat:category_name, specifies that the robot should - touch all pages in the named category. - - -redir specifies that the robot should touch redirect pages; - otherwise, they will be skipped. - All other parameters will be regarded as a page title; in this case, the bot will only touch a single page. """ @@ -41,6 +27,12 @@ import wikipedia, pagegenerators, catlib, weblinkchecker, upload import sys, re
+# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { + '¶ms;': pagegenerators.parameterHelp, +} + msg = { 'en': u'This image was inline linked from %s. No information on author, copyright status, or license is available.', 'he': u'תמונה זו הייתה מקושרת מהדף %s. אין מידע זמין על המחבר, מצב זכויות היוצרים או הרישיון.',
Modified: trunk/pywikipedia/lonelypages.py =================================================================== --- trunk/pywikipedia/lonelypages.py 2008-01-29 15:37:34 UTC (rev 4947) +++ trunk/pywikipedia/lonelypages.py 2008-01-30 10:17:03 UTC (rev 4948) @@ -4,15 +4,28 @@ This is a script written to add the template "orphan" to the pages that aren't linked by other pages. It can give some strange Errors sometime, I hope that all of them are fixed in this version.
+These command line parameters can be used to specify which pages to work on: + +¶ms; + +-xml Retrieve information from a local XML dump (pages-articles + or pages-meta-current, see http://download.wikimedia.org). + Argument can also be given as "-xml:filename". + +-page Only edit a specific page. + Argument can also be given as "-page:pagetitle". You can + give this parameter multiple times to edit multiple pages. + +Furthermore, the following command line parameters are supported: + -enable: - Enable or disable the bot via a Wiki Page. + -disambig: - Set a page where the bot save the name of the disambig pages found (default: skip the pages) + -limit: - Set how many pages check. --page: - Work only on the page given. + -always - Always say yes, won't ask --newpages: - Check the newpages (default: the first 50 pages)
--standard arguments (like -start, -cat, -ref and so on) - --- FixMes --- * Check that all the code hasn't bugs
@@ -36,6 +49,12 @@ import wikipedia, pagegenerators import re
+# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { + '¶ms;': pagegenerators.parameterHelp, +} + ##################################################### # Here you have to put the config for your Project. # #####################################################