Revision: 4243
Author: russblau
Date: 2007-09-11 18:03:52 +0000 (Tue, 11 Sep 2007)
Log Message:
-----------
Fix help text; Bug 1792492
Modified Paths:
--------------
trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py 2007-09-11 17:16:19 UTC (rev 4242)
+++ trunk/pywikipedia/pagegenerators.py 2007-09-11 18:03:52 UTC (rev 4243)
@@ -15,65 +15,65 @@
"""
__version__='$Id$'
-parameterHelp = """ -cat Work on all pages which are in a specific category.
- Argument can also be given as "-cat:categoryname".
+parameterHelp = """\
+-cat Work on all pages which are in a specific category.
+ Argument can also be given as "-cat:categoryname".
- -file Read a list of pages to treat from the named text file.
- Page titles in the file must be enclosed with [[brackets]].
- Argument can also be given as "-file:filename".
+-file Read a list of pages to treat from the named text file.
+ Page titles in the file must be enclosed with [[brackets]].
+ Argument can also be given as "-file:filename".
- -filelinks Work on all pages that use a certain image/media file.
- Argument can also be given as "-file:filename".
+-filelinks Work on all pages that use a certain image/media file.
+ Argument can also be given as "-file:filename".
- -google Work on all pages that are found in a Google search.
- You need a Google Web API license key. Note that Google
- doesn't give out license keys anymore. See google_key in
- config.py for instructions.
- Argument can also be given as "-google:searchstring".
+-google Work on all pages that are found in a Google search.
+ You need a Google Web API license key. Note that Google
+ doesn't give out license keys anymore. See google_key in
+ config.py for instructions.
+ Argument can also be given as "-google:searchstring".
- -interwiki Work on the given page and all equivalent pages in other
- languages. This can, for example, be used to fight
- multi-site spamming.
- Attention: this will cause the bot to modify
- pages on several wiki sites, this is not well tested,
- so check your edits!
+-interwiki Work on the given page and all equivalent pages in other
+ languages. This can, for example, be used to fight
+ multi-site spamming.
+ Attention: this will cause the bot to modify
+ pages on several wiki sites, this is not well tested,
+ so check your edits!
- -links Work on all pages that are linked from a certain page.
- Argument can also be given as "-links:linkingpagetitle".
+-links Work on all pages that are linked from a certain page.
+ Argument can also be given as "-links:linkingpagetitle".
- -new Work on the 60 newest pages. If given as -new:x, will work
- on the x newest pages.
+-new Work on the 60 newest pages. If given as -new:x, will work
+ on the x newest pages.
- -ref Work on all pages that link to a certain page.
- Argument can also be given as "-ref:referredpagetitle".
+-ref Work on all pages that link to a certain page.
+ Argument can also be given as "-ref:referredpagetitle".
- -start Specifies that the robot should go alphabetically through
- all pages on the home wiki, starting at the named page.
- Argument can also be given as "-subcat:pagetitle".
+-start Specifies that the robot should go alphabetically through
+ all pages on the home wiki, starting at the named page.
+ Argument can also be given as "-start:pagetitle"
- -subcat Like -cat, but also includes pages in subcategories of the
- given category.
- Argument can also be given as "-subcat:categoryname".
+-subcat Like -cat, but also includes pages in subcategories of the
+ given category.
+ Argument can also be given as "-subcat:categoryname".
- -transcludes Work on all pages that use a certain template.
- Argument can also be given as "-transcludes:Template:Title".
+-transcludes Work on all pages that use a certain template.
+ Argument can also be given as "-transcludes:Template:Title".
- -unusedfiles Work on all description pages of images/media files that are
- not used anywhere.
- Argument can also be given as "-unusedfiles:n" where
- n is some number (??).
+-unusedfiles Work on all description pages of images/media files that are
+ not used anywhere.
+ Argument can be given as "-unusedfiles:n" where
+ n is the maximum number of articles to work on.
- -unwatched Work on all articles that are not watched by anyone.
- Argument can also be given as "-unusedfiles:n" where
- n is some number (??).
+-unwatched Work on all articles that are not watched by anyone.
+ Argument can be given as "-unwatched:n" where
+ n is the maximum number of articles to work on.
- -weblink Specifies that the robot should go alphabetically through
- all pages on the home wiki, starting at the named page.
- Argument can also be given as "-subcat:pagetitle".
+-weblink Work on all articles that contain an external link to
+ a given URL; may be given as "-weblink:url"
- -withoutinterwiki Work on all pages that don't have interlanguage links.
- Argument can also be given as "-withoutinterwiki:n" where
- n is some number (??).
+-withoutinterwiki Work on all pages that don't have interlanguage links.
+ Argument can be given as "-withoutinterwiki:n" where
+ n is some number (??).
"""
@@ -260,9 +260,11 @@
yield wikipedia.Page(wikipedia.getSite(), title)
def LinksearchPageGenerator(link, step=500, site = None):
- """Yields all pages that include a specified link, according to [[Special:Linksearch]].
+ """Yields all pages that include a specified link, according to
+ [[Special:Linksearch]].
Retrieves in chunks of size "step" (default 500).
- Does not guarantee that resulting pages are unique."""
+ Does not guarantee that resulting pages are unique.
+ """
if site is None:
site = wikipedia.getSite()
elRX = re.compile('<a .* class="external ?" .*</a>.*<a .*>(.*)</a>') #TODO: de-uglify?
Bugs item #1788099, was opened at 2007-09-04 23:40
Message generated for change (Settings changed) made by malafaya
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1788099&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
Status: Open
Resolution: None
>Priority: 6
Private: No
Submitted By: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: featured.py inserting {{Link FA}} before categories
Initial Comment:
According to the comment in the source code of featured.py:
# insert just before interwiki
, the featured template should be inserted just before the interwiki links. I got a complaint on the bot moving the featured templates to above the categories.
Please check:
http://ka.wikipedia.org/w/index.php?title=%E1%83%90%E1%83%A0%E1%83%A2%E1%83…
(Categories are [[კატეგორია:***]] in this Wikipedia)
Thanks.
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2007-09-10 17:46
Message:
Logged In: YES
user_id=1136737
Originator: NO
This comment only work on old featured.py. Now featured.py organize
interwikis and categories same the interwiki.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1788099&group_…
Bugs item #1790289, was opened at 2007-09-07 16:54
Message generated for change (Comment added) made by malafaya
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1790289&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 1
Private: No
Submitted By: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add disambiguation template for Polish
Initial Comment:
When processing Wikipedia article [[en:RSS]], link to [[pl:RSS]] was found. Although, this Polish article is a disambiguation page marked with {{DisambigR}} which is not contemplated in wikipedia_family.py for disambiguation templates. Therefore, I would get a duplicated link to [[pl:]] and processing would abort. By ignoring [[pl:RSS]] I managed to process the article.
Plase add DisambigR to the Polish disambiguation templates:
'pl': [u'Disambig', u'DisambRulers', u'DisambigC', u'Strona ujednoznaczniająca', u'DisambigR'],
in line 433 of wikipedia_family.py.
Thanks.
----------------------------------------------------------------------
>Comment By: André Malafaya Baptista (malafaya)
Date: 2007-09-11 18:46
Message:
Logged In: YES
user_id=1037345
Originator: YES
Sorry, I don't have a clue. I'm not a contributor to the Polish Wikipedia
as I'm not even Polish.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2007-09-07 23:54
Message:
Logged In: YES
user_id=880694
Originator: NO
I also think this is more like {{otheruses}} on en:, not a template for
disambiguation pages.
BTW, Can we remove DisambRulers and DisambigC? They seem to have been
deleted.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2007-09-07 17:06
Message:
Logged In: YES
user_id=1037345
Originator: YES
I'm not so sure about this:
it seems another page exists in Polish [[pl:RSS (ujednoznaczniająca)]]
which is the *real* disambiguation page. The one above [[pl:RSS]] is
another kind of "more specific" disambiguation page, only for informatic
terms...
Maybe it's better not to do anything until further information is
obtained.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1790289&group_…
Bugs item #1792492, was opened at 2007-09-11 17:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1792492&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Falk Steinhauer (falk_steinhauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: wrong argument description of pagegenerators.py
Initial Comment:
I am using snapshot 2007-08-11.
There are miscellaneous copyNpaste-errors in string "parameterHelp" of file pagegenerators.py.
e.g.
-unwatched Work on all articles that are not watched by anyone.
Argument can also be given as "-unusedfiles:n" where
n is some number (??).
must be:
-unwatched Work on all articles that are not watched by anyone.
Argument can also be given as "-unwatched:n" where
n is some number (??).
or
-start Specifies that the robot should go alphabetically through
all pages on the home wiki, starting at the named page.
Argument can also be given as "-subcat:pagetitle".
must be:
-start Specifies that the robot should go alphabetically through
all pages on the home wiki, starting at the named page.
Argument can also be given as "-start:pagetitle".
more wrong descriptions:
-weblinks
-filelinks
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1792492&group_…
Bugs item #1787369, was opened at 2007-09-03 22:53
Message generated for change (Comment added) made by falk_steinhauer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1787369&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in wikipedia.py function getCategoryLinks()
Initial Comment:
I am using snapshot 2007-06-19.
Function getCategoryLinks() returns categories, that are defined within <pre>-tokens. In opposition the MediaWiki-software (version 1.9.3) ignores those strings.
The framework should show the same behaviour.
P.S.: wikipedian! Warst du im Urlaub? Ich hab mich gewundert warum mein Fix solange im Bug-Tracker rumgelegen ist ;-).
----------------------------------------------------------------------
Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-11 16:43
Message:
Logged In: YES
user_id=1810075
Originator: NO
I updated to snapshot 2007-08-11.
Error is still there.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2007-09-03 23:50
Message:
Logged In: YES
user_id=880694
Originator: NO
Markup within <pre> tags will now be ignored when searching for
categories, links, interwikis etc.
Falk: Nee, muss bloß lernen ;)
Ach ja, dein Snapshot ist uralt, hol dir einen nightly snapshot:
http://tools.wikimedia.de/~valhallasw/pywiki/
----------------------------------------------------------------------
Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-03 23:03
Message:
Logged In: YES
user_id=1810075
Originator: NO
I am actually seeing in [[Spezial:Version]], that "Parser extension tags"
includes "<pre>". Does this matter? I don't know what it means. Whether or
not, it might be good if the framework reacts exactly like the choosen
wiki.
----------------------------------------------------------------------
Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-03 22:55
Message:
Logged In: YES
user_id=1810075
Originator: NO
I reported the bug. Maybe my login-cookie was to old :-/
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1787369&group_…
Bugs item #1777175, was opened at 2007-08-19 11:35
Message generated for change (Comment added) made by falk_steinhauer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Falk Steinhauer (falk_steinhauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in wikipedia.py and corresponding fix
Initial Comment:
I am using snapshot 2007-06-19.
There is a bug in wikipedia.py. Function setSite() is just setting local variables, that are never used again.
Original:
def setSite(site):
default_code = site.language
default_family = site.family
I think it should affect the global variables with the same name (that's what I need in a script that should work on several different wikis and compare their contents).
In addtion default_code is a string, not a function-object. So my fixed version of setSite() looks as follows:
def setSite(site):
global default_code, default_family
default_code = site.language()
default_family = site.family
----------------------------------------------------------------------
>Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-11 16:25
Message:
Logged In: YES
user_id=1810075
Originator: YES
Sorry. It must be "I updated to snapshot 2007-08-11".
----------------------------------------------------------------------
Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-11 16:23
Message:
Logged In: YES
user_id=1810075
Originator: YES
I updated to snapshot 2007-06-19.
Error is still there.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…
Bugs item #1777175, was opened at 2007-08-19 11:35
Message generated for change (Comment added) made by falk_steinhauer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Falk Steinhauer (falk_steinhauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in wikipedia.py and corresponding fix
Initial Comment:
I am using snapshot 2007-06-19.
There is a bug in wikipedia.py. Function setSite() is just setting local variables, that are never used again.
Original:
def setSite(site):
default_code = site.language
default_family = site.family
I think it should affect the global variables with the same name (that's what I need in a script that should work on several different wikis and compare their contents).
In addtion default_code is a string, not a function-object. So my fixed version of setSite() looks as follows:
def setSite(site):
global default_code, default_family
default_code = site.language()
default_family = site.family
----------------------------------------------------------------------
>Comment By: Falk Steinhauer (falk_steinhauer)
Date: 2007-09-11 16:23
Message:
Logged In: YES
user_id=1810075
Originator: YES
I updated to snapshot 2007-06-19.
Error is still there.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…
Bugs item #1791651, was opened at 2007-09-10 17:03
Message generated for change (Settings changed) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1791651&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: imageReplace() is broken
Initial Comment:
Since wikipedian changed the function and tried to simplify the regexes, it introduced a bug. when attempting to replace an image in a gallery it will not remove old image instead it will just place the new image right before the old preventing any image from displaying. Image:foo.jpg is replaced by Image:bar.svg. in the gallery it becomes Image:bar.svgImage:foo.jpg
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1791651&group_…