https://bugzilla.wikimedia.org/show_bug.cgi?id=55041
Web browser: ---
Bug ID: 55041
Summary: Cosmetic_changes.py deletes cross wiki-links
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
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/feature-requests/296/
Reported by: Anonymous user
Created on: 2011-12-26 21:47:33
Subject: Cosmetic_changes.py deletes cross wiki-links
Original description:
Python 2.6.7 \(r267:88850, Sep 19 2011, 13:25:28\)
\[GCC 4.5.2\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
1\. I ran in RU-wiki one command:
python /home/$USERNAME/pywiki/cosmetic\_changes.py -lang:ru -always
-file:/tmp/somefile
2\. File "/tmp/somefile" contain list of articles for processing
Struthiomimus
QoS
3\. For article "Struthiomimus" in RU-wiki I see, that it was deleted EN
cross-link
\[\[en:Steveville|Steveville\]\]
https://secure.wikimedia.org/wikipedia/ru/w/index.php?title=Struthiomimus&d…
4\. I think, that cosmetic\_changes.py should not deletes cross-links to other
wikis.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55262
Web browser: ---
Bug ID: 55262
Summary: -dir: paramter not working, variable _base_dir has
unclear e
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/1224/
Reported by: purodha
Created on: 2010-08-22 21:57:45
Subject: -dir: paramter not working, variable _base_dir has unclear e
Assigned to: purodha
Original description:
In the current svn verision \(rev 8433\) there is a huge mess around the
parameter -dir.
It is not processed in the place where all general parameters are -
wikipedia.handleArgs\(\)
It is processed in wikipediatools an then deleted from the arguemnt list.
Since this code is executed multiple times \(e.g. 3 times in interwiki.py\) it
does different
and unwanted things from the 2nd call on.
We see repeated error messages about missing config files being created where
there
should be none. Login information is sought at the wrong place, requiring one
to log
in for each change made by interwiki.py, e.g.
config.py processed the -dir parameter and puts it into a variable \_base\_dir
This variable is being used inconsistently as:
\- the directory where user\_config is sought \(only during the 1st trip
through\),
\- the directory where family configurations are expected,
\- the directory where programs are to be found,
\- the directory where where a .svn subdirectory is expected,
which cannot be all identical if you are running multiple bots having
to have different user\_config.py files.
This all needs cleanup.
Since config data is processed before command line parameters are parsed,
this is not straigthforward. When there can be a -dir parameter, config
processing
must not occur before it has been seen, or is known not to be used.
Since the current handling is not working anyways, and multiple processing is a
waste
anyways, I suggest to move the entire config handling to
wikipedia.handleArgs\(\)
and make sure, it only happens once. This would likely obsolete most or all of
the
contents of wikipediatools.py
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54562
Web browser: ---
Bug ID: 54562
Summary: Bugfix for optional caputring group
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/patches/555/
Reported by: eranroz
Created on: 2012-07-03 18:35:29
Subject: Bugfix for optional caputring group
Original description:
Patch for pywikibot/textlib.py for the replace function \(replaceExcept\) for
supporting for empty/optional capturing groups.
This is a bugfix for a crash that occur when using replace.py with a regex
containing optional capturing group \(eg AAA in this regex "bla\(AAA\)?bla" \)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55191
Web browser: ---
Bug ID: 55191
Summary: Wrong startspace match in textlib.replaceexcept
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/1472/
Reported by: xqt
Created on: 2012-06-22 12:34:10
Subject: Wrong startspace match in textlib.replaceexcept
Original description:
textlib.replaceexcept wrongly matches 'startspace' within templates, e.g.
\{\{templatename
\_| option1 = foo
\_| option2 = bar
\}\}
\(replace\('\_', ' '\) first.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55226
Web browser: ---
Bug ID: 55226
Summary: -titleregex only searches mainspace
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/1386/
Reported by: bewareofdoug
Created on: 2011-12-06 22:56:55
Subject: -titleregex only searches mainspace
Original description:
Using the -titleregex parameter to a replace.py on the wikimedia commons only
gets me hits in the main \(gallery\) space not in file/image space where I
need it to. setting -namespace:6 does nothing and setting -prefixindex:file
'adds' mainspace content with the word file in front. The same result is
obtained when attempting to look in userspace \(though I didn't try it with
-namespace:\). An example is:
python replace.py -titleregex:".\*Nietzsche.\*" foooooooo bar
version.py output:
Pywikipedia \[http\] trunk/pywikipedia \(r9787, 2011/12/06, 07:41:04\)
Python 2.6.1 \(r261:67515, Jun 24 2010, 21:47:49\)
\[GCC 4.2.1 \(Apple Inc. build 5646\)\]
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=55280
Web browser: ---
Bug ID: 55280
Summary: he.wiki - interwikis outside main namespace
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/1153/
Reported by: masti01
Created on: 2010-03-21 21:17:22
Subject: he.wiki - interwikis outside main namespace
Original description:
the bot shpuld not add interwikis to pages outdside main namespace until it is
solved where to put them. A lot of pages in Wikipedia namespace have their
''doc'' pages but there is no common template showingthis pages. see
http://he.wikipedia.org/wiki/%D7%A9%D7%99%D7%97%D7%AA\_%D7%9E%D7%A9%D7%AA%D…
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55225
Web browser: ---
Bug ID: 55225
Summary: Error downloading data: No JSON object could be
decoded
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/1387/
Reported by: djbarrett
Created on: 2011-12-07 00:52:22
Subject: Error downloading data: No JSON object could be decoded
Original description:
replace.py produces the following error message in the middle of large
search-and-replace operations.
Error downloading data: No JSON object could be decoded: line 1 column 0 \(char
0\)
Request en:/w/api.php?
Retrying in 1 minutes...
1 minute later, it fails again and retries in 2 minutes, then 4 minutes, etc.
The command was:
$ python replace.py -regex -nocase -start:\!
'\\\\\\\\\(example\\.net|exampleus\)\\\common\\\softlib'
'\\\example.net\global\softlib'
and when prompted for a replacement, I typed "a" for "All". After doing a
bunch of replacements, the error started happening. This is with MediaWiki
1.17.1.
$ sudo python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r9787, 2011/12/06, 07:41:04\)
Python 2.4.3 \(\#1, May 5 2011, 16:39:10\)
\[GCC 4.1.2 20080704 \(Red Hat 4.1.2-50\)\]
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=55236
Web browser: ---
Bug ID: 55236
Summary: Self closing tags
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/1334/
Reported by: Anonymous user
Created on: 2011-08-28 15:13:07
Subject: Self closing tags
Original description:
Since MW 1.16 wgHtm5 and wgWellFormedXml are turned on by default. And
cosmetic\_changes.py still changes things like <br> to <br />, I
don't see any reason for that. There are three options we have here:
\* Stop making these kind of changes
\* Make these changes "complete" and add some tags that are not fixed \(eg.
<hr> to <hr />\)
\* Do just the opposite, and let the MW fix the tags \(eg. a<br/> to
<br>, etc\)
I like the third option, because it makes the code easier to read for editors.
In the attachment there's a patch to apply the third option.
python version.py:
Pywikipedia \[http\] trunk/pywikipedia \(r9462, 2011/08/28, 11:34:03\)
Python 2.7 \(r27:82500, Aug 07 2010, 16:54:59\) \[GCC\]
config-settings:
use\_api = True
use\_api\_login = True
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55169
Web browser: ---
Bug ID: 55169
Summary: Reading Templates within Templates
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/1525/
Reported by: Anonymous user
Created on: 2012-10-24 04:53:20
Subject: Reading Templates within Templates
Assigned to: xqt
Original description:
Hi\!
Pywikipedia is used to harvest the in-wiki monument lists to the monuments
database. I noticed the Error
https://bugzilla.wikimedia.org/show\_bug.cgi?id=39973, the following lines are
a copy of the existing bug:
Some values provided by headertemplates \(ie 'Gemeinde' in Austrian lists\) are
not filled if there is a template part of any row parameter. Specific example:
http://de.wikipedia.org/wiki/Liste\_der\_denkmalgesch%C3%BCtzten\_Objekte\_…
In article:
\{\{Denkmalliste Österreich Tabellenkopf
|Gemeinde = Pfons
|Bezirk = Bezirk Innsbruck Land
<...>
\}\}
\{\{Denkmalliste Österreich Tabellenzeile
|Name = Friedhof mit Kapellen und Kleindenkmalen
|Beschreibung =
|ObjektID = 110694
<...>
\}\}
\{\{Denkmalliste Österreich Tabellenzeile
|Name = Kath. Pfarrkirche Mariä Himmelfahrt
|Beschreibung = \{\{Hauptartikel|Mariä-Himmelfahrt-Kirche \(Pfons\)\}\}
|ObjektID = 64604
<...>
\}\}
and in database:
SELECT \`objektid\`, \`name\`, \`gemeinde\`, \`bezirk\` FROM
\`p\_erfgoed\_p\`.\`monuments\_at\_\(de\)\` WHERE \`objektid\` = 110694 or
\`objektid\` =
64604;
| objektid | name | gemeinde | bezirk
| 110694 | Friedhof mit Kapellen<...> | Pfons | Bezirk Innsbruck
Land
| 64604 | Kath. Pfarrkirche Mar<...> | |
many other examples can be found by SELECT \* FROM
\`p\_erfgoed\_p\`.\`monuments\_at\_\(de\)\` WHERE \`gemeinde\` = '';
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55149
Web browser: ---
Bug ID: 55149
Summary: setitem for wikidata doesn't work!
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/1587/
Reported by: reza1615
Created on: 2013-02-24 19:21:13
Subject: setitem for wikidata doesn't work!
Original description:
I used this code
\#\!/usr/bin/python
\# -\*- coding: utf-8 -\*-
import wikipedia,login
summary=u'آبشار لاتون,آبشار لاتون'
site=wikipedia.getSite\('fa',fam='wikipedia'\)
fapage=wikipedia.Page\(site,u'آبشار\_لاتون'\)
data=wikipedia.DataPage\(fapage\)
list=data.get\(\)
id=list\['entity'\].replace\('q',''\)
data = wikipedia.DataPage\(site.data\_repository\(\), "Q"+id\)
data.setitem\(summary,items=\{'type': u'item', 'label': 'glk',
'value':u'آبشار\_لاتون'\}\)
data.setitem\(summary,items=\{'type': u'sitelink', 'site': 'glk',
'title':u'آبشار\_لاتون\_\(بارزاو\)'\}\)
it shows
Updating page \[\[wikidata:Q5058182\]\] via API
Updating page \[\[wikidata:Q5058182\]\] via API
but it doesn't update the page\!
also please add
def getIdFromPage\(data\)
id=data.get\(\) \['entity'\].replace\('q',''\)
return id
and add
data = DataPage\(site.data\_repository\(\), "Q"+id\)
to first line of setitem\(\)
--
You are receiving this mail because:
You are the assignee for the bug.