Patches item #1912104, was opened at 2008-03-11 14:36
Message generated for change (Comment added) made by leogregianin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1912104&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: Accepted
Priority: 5
Private: No
Submitted By: AndreasJS (andreasjs)
Assigned to: Leonardo Gregianin (leogregianin)
Summary: interwiki: add "all" to namespace question
Initial Comment:
In Wikisource, authors are sometimes in namespace 102, but sometimes in the same namespace as the articles. The question:
WARNING: %s is in namespace %i, but %s is in namespace %i. Follow it anyway?'
appears everytime an author is encountered.
This patch adds the answer 'all' so that the question is not asked again for the same pair of language/namespace combinations.
----------------------------------------------------------------------
>Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-07-19 14:28
Message:
Logged In: YES
user_id=1136737
Originator: NO
I revert the last change, but is "always" allowed to do interwiki-links to
other namespaces, that question would not be necessary:
choice = wikipedia.inputChoice('WARNING: %s is in namespace %i, but %s is
in namespace %i. Follow it anyway?' % (self.originPage.aslink(True),
self.originPage.namespace(), linkedPage.aslink(True),
linkedPage.namespace()), ['Yes', 'No'], ['y', 'n'])
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-07-19 06:39
Message:
Logged In: YES
user_id=2116333
Originator: NO
If there are certain namespaces (f.ex. 102) in some wikisource-sites which
is "always" allowed to do interwiki-links to other namespaces (f.ex. 0) in
other wikisource-sites, you should build a corresponding
crossnamespace-dictionary for this. See
http://svn.wikimedia.org/viewvc/pywikipedia?view=rev&revision=5614 for more
information.
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-07-18 22:35
Message:
Logged In: YES
user_id=1136737
Originator: NO
add in r5733
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1912104&group_…
Patches item #1912104, was opened at 2008-03-11 14:36
Message generated for change (Comment added) made by stigmj
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1912104&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: Accepted
Priority: 5
Private: No
Submitted By: AndreasJS (andreasjs)
Assigned to: Leonardo Gregianin (leogregianin)
Summary: interwiki: add "all" to namespace question
Initial Comment:
In Wikisource, authors are sometimes in namespace 102, but sometimes in the same namespace as the articles. The question:
WARNING: %s is in namespace %i, but %s is in namespace %i. Follow it anyway?'
appears everytime an author is encountered.
This patch adds the answer 'all' so that the question is not asked again for the same pair of language/namespace combinations.
----------------------------------------------------------------------
Comment By: Stig Meireles Johansen (stigmj)
Date: 2008-07-19 06:39
Message:
Logged In: YES
user_id=2116333
Originator: NO
If there are certain namespaces (f.ex. 102) in some wikisource-sites which
is "always" allowed to do interwiki-links to other namespaces (f.ex. 0) in
other wikisource-sites, you should build a corresponding
crossnamespace-dictionary for this. See
http://svn.wikimedia.org/viewvc/pywikipedia?view=rev&revision=5614 for more
information.
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-07-18 22:35
Message:
Logged In: YES
user_id=1136737
Originator: NO
add in r5733
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1912104&group_…
Bugs item #1870511, was opened at 2008-01-13 21:48
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1870511&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: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: Leonardo Gregianin (leogregianin)
Summary: interwiki in <noinclude> in tempaltes
Initial Comment:
There is one BIG BUG:
in templates interwiki must be in <noinclude> tags, otherwise is in all articles the template is in.
If there exists at least one interwiki ling in this tags, is it OK.
But if there is no interwiki link yet, interwiki links are added to the end of template.
I have many messages from upsetted users, tat my bot added interwiki to some template.
Now the only solution is to run bot with
-localonly ...
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-07-19 11:46
Message:
Logged In: YES
user_id=1963242
Originator: NO
I just tried (
http://fr.wikipedia.org/w/index.php?title=Mod%C3%A8le:Incubator&diff=prev&o…
) and that seems to work.
However, I'm not sure if this works for every case. Can anyone point me to
the change addressing that issue ? I believe that some borderline cases
might not be handled right...
----------------------------------------------------------------------
Comment By: Leonardo Gregianin (leogregianin)
Date: 2008-07-19 05:22
Message:
Logged In: YES
user_id=1136737
Originator: NO
fixing in the past..
----------------------------------------------------------------------
Comment By: Carsrac (carsrac)
Date: 2008-05-21 22:38
Message:
Logged In: YES
user_id=2066902
Originator: NO
Could some put a very higher priority on this bug.
IMHO all the interwiki links should be include in <noinclude> tags until
this bug is solved.
Now templates and subpages could not be interwiki'ed by bot, but needs to
be done by hand.
Just look at the massive lists of articles in "list of asteroids" in
english wiki and the it translation in ast, zh, an. I have started to
correct it by hand.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-02-07 10:13
Message:
Logged In: NO
This is an ever-lasting and annoying bug, see "[ 1710764 ] interwiki's on
template", "[ 1729765 ] interwiki.py: templates with <noinclude>"
May somebody finally fix it?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1870511&group_…
Revision: 5740
Author: leogregianin
Date: 2008-07-19 04:06:55 +0000 (Sat, 19 Jul 2008)
Log Message:
-----------
fixed bug 188064 - Collision of commandline arguments
Modified Paths:
--------------
trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/replace.py
===================================================================
--- trunk/pywikipedia/replace.py 2008-07-19 04:03:18 UTC (rev 5739)
+++ trunk/pywikipedia/replace.py 2008-07-19 04:06:55 UTC (rev 5740)
@@ -18,7 +18,7 @@
Furthermore, the following command line parameters are supported:
--regex Make replacements using regular expressions. If this argument
+-useregex Make replacements using regular expressions. If this argument
isn't given, the bot will make simple text replacements.
-nocase Use case insensitive regular expressions.
@@ -29,16 +29,16 @@
-addcat:cat_name Adds "cat_name" category to every altered page.
--excepttitle:XYZ Skip pages with titles that contain XYZ. If the -regex
+-excepttitle:XYZ Skip pages with titles that contain XYZ. If the -useregex
argument is given, XYZ will be regarded as a regular
expression.
--excepttext:XYZ Skip pages which contain the text XYZ. If the -regex
+-excepttext:XYZ Skip pages which contain the text XYZ. If the -useregex
argument is given, XYZ will be regarded as a regular
expression.
-exceptinside:XYZ Skip occurences of the to-be-replaced text which lie
- within XYZ. If the -regex argument is given, XYZ will be
+ within XYZ. If the -useregex argument is given, XYZ will be
regarded as a regular expression.
-exceptinsidetag:XYZ Skip occurences of the to-be-replaced text which lie
@@ -57,7 +57,7 @@
-fix:XYZ Perform one of the predefined replacements tasks, which are
given in the dictionary 'fixes' defined inside the file
fixes.py.
- The -regex and -nocase argument and given replacements will
+ The -useregex and -nocase argument and given replacements will
be ignored if you use -fix.
Currently available predefined fixes are:
&fixes-help;
@@ -77,7 +77,7 @@
Be careful, this might lead to an infinite loop.
other: First argument is the old text, second argument is the new
- text. If the -regex argument is given, the first argument
+ text. If the -useregex argument is given, the first argument
will be regarded as a regular expression, and the second
argument might contain expressions like \\1 or \g<name>.
@@ -87,7 +87,7 @@
new syntax, e.g. {{Stub}}, download an XML dump file (pages-articles) from
http://download.wikimedia.org, then use this command:
- python replace.py -xml -regex "{{msg:(.*?)}}" "{{\\1}}"
+ python replace.py -xml -useregex "{{msg:(.*?)}}" "{{\\1}}"
If you have a dump called foobar.xml and want to fix typos in articles, e.g.
Errror -> Error, use this:
@@ -490,7 +490,7 @@
# Read commandline parameters.
for arg in wikipedia.handleArgs():
- if arg == '-regex':
+ if arg == '-useregex':
regex = True
elif arg.startswith('-xmlstart'):
if len(arg) == 9:
Revision: 5741
Author: nicdumz
Date: 2008-07-19 09:27:54 +0000 (Sat, 19 Jul 2008)
Log Message:
-----------
* Revert 5740
* Resolving the -regex arg collision by making pagegenerator's -regex -titleregex
* Removing inconsistent usage doc
Modified Paths:
--------------
trunk/pywikipedia/pagegenerators.py
trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py 2008-07-19 04:06:55 UTC (rev 5740)
+++ trunk/pywikipedia/pagegenerators.py 2008-07-19 09:27:54 UTC (rev 5741)
@@ -91,12 +91,12 @@
"-start:Template:!" will make the bot work on all pages
in the template namespace.
--prefixindex Work on pages commencing with a common prefix. Argument
- may also be given as "-prefixindex:namespace:pagename".
+-prefixindex Work on pages commencing with a common prefix.
--regex Work on pages found by a regular expression. Argument
- may also be given as "-prefixindex:regularexpression".
+-regex Obsolete, use -titleregex
+-titleregex Work on titles that match the given regular expression.
+
-transcludes Work on all pages that use a certain template.
Argument can also be given as "-transcludes:Template:Title".
@@ -953,7 +953,7 @@
gen = SearchPageGenerator(mediawikiQuery, namespaces = [])
elif arg.startswith('-google'):
gen = GoogleSearchPageGenerator(arg[8:])
- elif arg.startswith('-regex'):
+ elif arg.startswith('-titleregex'):
if len(arg) == 6:
regex = wikipedia.input(u'What page names are you looking for?')
else:
Modified: trunk/pywikipedia/replace.py
===================================================================
--- trunk/pywikipedia/replace.py 2008-07-19 04:06:55 UTC (rev 5740)
+++ trunk/pywikipedia/replace.py 2008-07-19 09:27:54 UTC (rev 5741)
@@ -18,7 +18,7 @@
Furthermore, the following command line parameters are supported:
--useregex Make replacements using regular expressions. If this argument
+-regex Make replacements using regular expressions. If this argument
isn't given, the bot will make simple text replacements.
-nocase Use case insensitive regular expressions.
@@ -29,16 +29,16 @@
-addcat:cat_name Adds "cat_name" category to every altered page.
--excepttitle:XYZ Skip pages with titles that contain XYZ. If the -useregex
+-excepttitle:XYZ Skip pages with titles that contain XYZ. If the -regex
argument is given, XYZ will be regarded as a regular
expression.
--excepttext:XYZ Skip pages which contain the text XYZ. If the -useregex
+-excepttext:XYZ Skip pages which contain the text XYZ. If the -regex
argument is given, XYZ will be regarded as a regular
expression.
-exceptinside:XYZ Skip occurences of the to-be-replaced text which lie
- within XYZ. If the -useregex argument is given, XYZ will be
+ within XYZ. If the -regex argument is given, XYZ will be
regarded as a regular expression.
-exceptinsidetag:XYZ Skip occurences of the to-be-replaced text which lie
@@ -57,7 +57,7 @@
-fix:XYZ Perform one of the predefined replacements tasks, which are
given in the dictionary 'fixes' defined inside the file
fixes.py.
- The -useregex and -nocase argument and given replacements will
+ The -regex and -nocase argument and given replacements will
be ignored if you use -fix.
Currently available predefined fixes are:
&fixes-help;
@@ -77,7 +77,7 @@
Be careful, this might lead to an infinite loop.
other: First argument is the old text, second argument is the new
- text. If the -useregex argument is given, the first argument
+ text. If the -regex argument is given, the first argument
will be regarded as a regular expression, and the second
argument might contain expressions like \\1 or \g<name>.
@@ -87,7 +87,7 @@
new syntax, e.g. {{Stub}}, download an XML dump file (pages-articles) from
http://download.wikimedia.org, then use this command:
- python replace.py -xml -useregex "{{msg:(.*?)}}" "{{\\1}}"
+ python replace.py -xml -regex "{{msg:(.*?)}}" "{{\\1}}"
If you have a dump called foobar.xml and want to fix typos in articles, e.g.
Errror -> Error, use this:
@@ -490,7 +490,7 @@
# Read commandline parameters.
for arg in wikipedia.handleArgs():
- if arg == '-useregex':
+ if arg == '-regex':
regex = True
elif arg.startswith('-xmlstart'):
if len(arg) == 9: