https://bugzilla.wikimedia.org/show_bug.cgi?id=55242
Web browser: ---
Bug ID: 55242
Summary: Fix translateAndCapitalizeNamespaces for Portuguese
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1323/
Reported by: heldergeovane
Created on: 2011-06-30 14:48:20
Subject: Fix translateAndCapitalizeNamespaces for Portuguese
Assigned to: xqt
Original description:
Per discussion on
https://secure.wikimedia.org/wikipedia/pt/wiki/Wikipédia:Esplanada/proposta…"Imagem"\_em\_vez\_de\_"Arquivo"\_ou\_"Ficheiro"\_\(12mar2011\)?uselang=en
please, change the function translateAndCapitalizeNamespaces \(from
cosmetic\_changes.py\) so that the bots stop doing the following chnges:
\* Image --> Ficheiro
\* File --> Ficheiro
\* Arquivo --> Ficheiro
\* Imagem --> Ficheiro
This is necessary in order to avoid linguistic problems, considering that
"Arquivo" is the preferred word on Brazil but "Ficheiro" is preferred on
Portugal.
For \*\*image\*\* files, the word "Imagem" is common to both Portuguese
variants, and as such it is preferred, so this should be the name used when
changing the namespace name of images. The use of "Ficheiro" and "Arquivo" is
preferred only for \*\*other kinds of files\*\* \(such as PDF or OGG\), which
are not images.
So, in short, the bots should do the following changes:
\* For images \(i.e. files with one of the following extensions: png, gif, jpg,
jpeg, svg, tiff, tif\), change:
\*\* Image --> Imagem
\*\* File --> Imagem
\*\* Ficheiro --> Imagem
\*\* Arquivo --> Imagem
\*For other files \(i.e. files with one of the following extensions: xcf, pdf,
mid, ogg, ogv, djvu, oga\):
\*\* Arquivo --> Do not change \(we should respect the variant used by the
editors\)
\*\* Ficheiro --> Do not change \(we should respect the variant used by the
editors\)
\*\* File --> Do not change \(or change randomly to "Ficheiro" or "Arquivo",
since it is indeed a "file" and both pt and pt-BR are acceptable\)
\*\* Image --> Do not change \(or change randomly to "Ficheiro" or
"Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable\)
\*\* Imagem --> Do not change \(or change randomly to "Ficheiro" or
"Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable\)
PS: the output of "python version.py" is the foolowing, although this bug
report applies to all versions:
\----
Pywikipedia \[http\] trunk/pywikipedia \(r9323, 2011/06/30, 12:40:56\)
Python 2.7.1+ \(r271:86832, Apr 11 2011, 18:13:53\)
\[GCC 4.5.2\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
\----
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55217
Web browser: ---
Bug ID: 55217
Summary: _getContentsNaive doesn't honour "recurse" parameter
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1403/
Reported by: Anonymous user
Created on: 2012-02-03 21:35:56
Subject: _getContentsNaive doesn't honour "recurse" parameter
Original description:
\--- catlib.py \(révision 9851\)
+++ catlib.py \(copie de travail\)
@@ -170,7 +170,12 @@
sortby=sortby, sortdir=sortdir\):
yield tag, page
if tag == SUBCATEGORY and recurse:
\- for item in page.\_getContentsNaive\(recurse=True,
\+ if recurse:
\+ if type\(recurse\) is int:
\+ newrecurse = recurse - 1
\+ else:
\+ newrecurse = recurse
\+ for item in page.\_getContentsNaive\(recurse=newrecurse,
sortby=sortby, sortdir=sortdir\):
yield item
my version:
guillaume@barbaz:~/src/pywikipedia$ python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r9850, 2012/02/01, 12:21:57\)
Python 2.7.1+ \(r271:86832, Apr 11 2011, 18:13:53\)
\[GCC 4.5.2\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55330
Web browser: ---
Bug ID: 55330
Summary: interwiki.py -untranslatedonly -number:nn not
intuitive
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: interwiki.py
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/412/
Reported by: purodha
Created on: 2007-06-03 13:26:17
Subject: interwiki.py -untranslatedonly -number:nn not intuitive
Original description:
interwiki.py -untranslatedonly -number:nn -confirm
acts counterinuitively. I expect the be asked for nn groups of page hints, and
that nn pages may be altered.
In fact, nn pages are being checked, and only those among them which match the
-untranslatedonly criterion, are possibly altered. Only for those, hints are
being asked from me. Their number is usually far less than nn, and may be even
zero. I have to know, or guess, how many "-untranslatedonly" pages there are in
a selection, given e.g. by -cat:cc, or -link:ll, etc., and how these are
distributed, so as to find a decent value for nn, to avoid unneccessary loading
of pages \(if I choose nn too high\) or a too short session \(if I choose nn
too low\) which due to reprocessing the same call with a larger nn, again
creates an unneccessary burden on the servers.
What I want with -untranslatedonly -number:nn -confirm, is to process exactly
nn pages. I want to be asked about less pages only, if my selection has been
exhausted before nn pages have been processed.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55057
Web browser: ---
Bug ID: 55057
Summary: Add upload protection to protect.py
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/269/
Reported by: Anonymous user
Created on: 2010-10-20 12:14:56
Subject: Add upload protection to protect.py
Original description:
It would be quite useful for the file protect.py to also have the upload
protection so wikis like Commons can move to the upload protection of all
files.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=59013
Web browser: ---
Bug ID: 59013
Summary: KeyError in site.py in token function when token type
is "move"
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: pyfisch(a)googlemail.com
Classification: Unclassified
Mobile Platform: ---
Created attachment 14181
--> https://bugzilla.wikimedia.org/attachment.cgi?id=14181&action=edit
Terminal output
There is only an "edittoken" and no "movetoken" in the item dict:
{u'lastrevid': 503550838, u'pageid': 17875787, u'title': u'Category
talk:Contents', u'starttimestamp': u'2013-12-28T10:25:42Z', u'counter': u'',
u'length': 1820, u'contentmodel': u'wikitext', u'pagelanguage': u'en',
u'touched': u'2013-08-05T20:18:23Z', u'ns': 15}
A complete log is in the attachment.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55335
Web browser: ---
Bug ID: 55335
Summary: command-line parameter '-log' and pwb.py not
compatible
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: dr.trigon(a)surfeu.ch
Classification: Unclassified
Mobile Platform: ---
When using pwb.py together with '-log', e.g. run
$ python pwb.py clean_sandbox.py -simulate -log
we get 2 log files created, namely:
* 'logs/pwb.log' (wrong)
* 'logs/pwb.pyclean_sandbox.py-simulate-log.log' (correct)
of which the first is wrong and should not be used at all.
Look also at https://gerrit.wikimedia.org/r/#/c/85411/ .
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55333
Web browser: ---
Bug ID: 55333
Summary: command-line parameter '-log' and user-config.py
switch 'log=' not compatible
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: dr.trigon(a)surfeu.ch
Classification: Unclassified
Mobile Platform: ---
When adding following switch to user-config.py:
log = ['*']
and then use it together with '-log', e.g. run
$ python pwb.py clean_sandbox.py -simulate -log
we get a mess in the log file (all lines doubled).
Look also at https://gerrit.wikimedia.org/r/#/c/85411/ .
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=59649
Web browser: ---
Bug ID: 59649
Summary: transferbot does not support namespaces in right way
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Classification: Unclassified
Mobile Platform: ---
c:\Pywikipedia\ssh\pywikibot\core>pwb.py transferbot -simulate
-page:user:xqt/Te
st -tolang:en -overwrite -tofamily:wiktionary
Page transfer configuration
---------------------------
Source: Site("de", "wikipedia")
Target: Site("en", "wiktionary")
Pages to transfer: -page:user:xqt/Test
Prefix for transferred pages:
Moving [[Benutzer:Xqt/Test]] to [[wiktionary:en:Benutzer:Xqt/Test]]...
<noinclude>
The appended summary text is:
<small>This page was moved from [[wikipedia:de:Benutzer:Xqt/Test]]. It's edit
hi
story can be viewed at [[Benutzer:Xqt/Test/edithistory]]</small>
There are wrong namespaces aliases on target site. This could be solved easily,
but I don't know how to proceed with prefix because that might be a namespace.
What is the right way:
prefix + namespace + title
or
prefix + title
or
namespace + prefix + title
where title is without namespace in this sample.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55272
Web browser: ---
Bug ID: 55272
Summary: redirectRegex throws type error
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1201/
Reported by: dnessett
Created on: 2010-06-24 16:31:01
Subject: redirectRegex throws type error
Assigned to: xqt
Original description:
Running MW 1.13.2, the following command throws a type error:
$ python add\_text.py
-cat:Pages\_with\_too\_many\_expensive\_parser\_function\_calls -text:" "
-summary:"Test edit:Category jog for \[\[:Category:Pages with too many
expensive parser function calls|Pages with too many expensive parser function
calls\]\]"
The result is:
Getting \[\[Category:Pages with too many expensive parser function calls\]\]...
Loading 2009 White House Forum on Health Reform/Related Articles...
Do you want to accept these changes? \(\[y\]es, \[N\]o, \[a\]ll\) a
Updating page \[\[2009 White House Forum on Health Reform/Related Articles\]\]
via API
Loading 2010 United Kingdom general election/Related Articles...
Traceback \(most recent call last\):
File "add\_text.py", line 417, in <module>
main\(\)
File "add\_text.py", line 413, in main
create=talkPage\)
File "add\_text.py", line 201, in add\_text
text = page.get\(\)
File "/usr/local/src/python/pywikipedia/local\_sites/wikipedia.py", line 619,
in get
self.\_contents = self.\_getEditPage\(get\_redirect = get\_redirect, throttle =
throttle, sysop = sysop\)
File "/usr/local/src/python/pywikipedia/local\_sites/wikipedia.py", line 727,
in \_getEditPage
m = self.site\(\).redirectRegex\(\).match\(pagetext\)
File "/usr/local/src/python/pywikipedia/local\_sites/wikipedia.py", line 6644,
in redirectRegex
pattern = r'\(?:' + '|'.join\(keywords\) + '\)'
TypeError
version.py output is:
$ python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r8311, 2010/06/22, 13:20:10\)
Python 2.5.2 \(r252:60911, Jan 20 2010, 21:48:48\)
\[GCC 4.2.4 \(Ubuntu 4.2.4-1ubuntu3\)\]
config-settings:
use\_api = True
use\_api\_login = True
This error occurs due to the following bug in the code. At line 6642 is the
following code fragment:
try:
keywords = self.getmagicwords\('redirect'\)
pattern = r'\(?:' + '|'.join\(keywords\) + '\)'
except KeyError:
\# no localized keyword for redirects
pattern = r'\#%s' % default
getmagicwords is a one line method that simply calls siteinfo \(line 5480\)
with the key 'magicwords'. At line 5518, siteinfo calls getData to obtain site
data. When looking for magicwords, the method executes "for entry in
data\[key\]" at line 5527. For certain versions of MW, magicwords are not
returned as part of the site data and therefore data\[key\] returns a null
result. Eventually, this leads to the KeyError exception at line 5538.
The bug arises because siteinfo catches the KeyError exception and returns a
result of "None". When the call is unwound back to line 6643 the provision for
a KeyError at line 6645 is vacuous. The KeyError has already been caught by
siteinfo.
Consequently, the statement at line 6644 executes. This causes a TypeError
since the keyword arguement to .join\(\) is null.
--
You are receiving this mail because:
You are the assignee for the bug.