https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
Web browser: --- Bug ID: 56774 Summary: Port commonscat.py to Pywikibot core Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Keywords: easy Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: crangasi2001@yahoo.com CC: aklapper@wikimedia.org, ladsgroup@gmail.com, qgil@wikimedia.org Blocks: 55880 Classification: Unclassified Mobile Platform: ---
PyWikibot [1] is a Python-based framework to write bots for MediaWiki. There are currently 2 versions of pywikibot currently used: - version 1.0 (also known as pywikibot-compat) is the legacy version - version 2.0 (also known as pywikibot-core) is a rewrite of the original framework, focusing solely on MediaWiki wikis with an API (version 1.14 or newer) and offering an improved internal architecture.
There are a number of scripts used by various robot operators that were used in pywikibot-compat but have not yet been adapted to work with pywikibot-core. One of those is commonscat.py, which allows you to add the template {{commonscat}} (a link to a category from Wikimedia Commons) to categories. The tool works by following the interwiki links. If the template is present on another langauge page, the bot will use it.
You can find information about how to convert the script on [2], [3]. Patches can be submited through the gerrit uploader [4] (you need a MediaWiki.org account). More documentation on gerrit can be found at [5].
[1] https://www.mediawiki.org/wiki/Manual:Pywikibot [2] https://www.mediawiki.org/wiki/Manual:Pywikibot/2.0/Conversion [3] https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n_conversion [4] https://tools.wmflabs.org/gerrit-patch-uploader/ [5] http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Gerrit
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
Strainu crangasi2001@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Whiteboard| |gci2013 | |https://www.mediawiki.org/w | |iki/Google_Code-In#Candidat | |e_tasks
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
pyfisch@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pyfisch@googlemail.com
--- Comment #1 from pyfisch@googlemail.com --- I will convert the script to core.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
pyfisch@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |56873
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #2 from Strainu crangasi2001@yahoo.com --- (In reply to comment #1)
I will convert the script to core.
Hi pyfish. This bug was logged as a Google CodeIn task. I think it would be preferable to leave it to one of the students.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #3 from Andre Klapper aklapper@wikimedia.org --- If this depends on bug 56873, doesn't bug 56873 need to be fixed first (it's not marked as a GCI task)?
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #4 from Strainu crangasi2001@yahoo.com --- Bug 56873 was just added by pyfish. I don't really think it's blocking the port, since you can always test with a wiki which does *not* throw an error. I would call 56873 as relevant to this one, not blocking. Still, it would be great if we could get if fixed befor GCI.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #5 from pyfisch@googlemail.com --- Sorry, I did not see that it should not be fixed by normal users. I uploaded a patch with my already done work (converting add_text.py) to this bug. https://gerrit.wikimedia.org/r/#/c/94623/
I am myself a student, so I could participate in Google Code-In and solve it there. :-P
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
JAn Dudík jan.dudik@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.dudik@gmail.com
--- Comment #6 from JAn Dudík jan.dudik@gmail.com --- It would be useful to change this script in both co[mpat|re] for work with wikidata siltelink and P373 too.
When is on page not {{commonscat}}, look to wikidata first, then on commons and add new template, if exists anywgere
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #7 from Andre Klapper aklapper@wikimedia.org --- (In reply to comment #5)
I am myself a student, so I could participate in Google Code-In and solve it there. :-P
If you fit the GCI requirements, that is indeed possible.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
--- Comment #8 from Strainu crangasi2001@yahoo.com --- (In reply to comment #6)
It would be useful to change this script in both co[mpat|re] for work with wikidata siltelink and P373 too.
When is on page not {{commonscat}}, look to wikidata first, then on commons and add new template, if exists anywgere
Would you mind logging another bug for that? We can also add it as a GCI task.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
Bug 56774 depends on bug 56873, which changed state.
Bug 56873 Summary: Category.isCategoryRedirect() does not work on wikis without category redirect template defined in family file https://bugzilla.wikimedia.org/show_bug.cgi?id=56873
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
Allen Guo guoguo12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |guoguo12@gmail.com
--- Comment #9 from Allen Guo guoguo12@gmail.com --- This bug has been resolved: https://git.wikimedia.org/commit/pywikibot%2Fcore.git/91b9acc05a4162fc23394d....
https://bugzilla.wikimedia.org/show_bug.cgi?id=56774
Nemo federicoleva@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Assignee|Pywikipedia-bugs@lists.wiki |guoguo12@gmail.com |media.org |
pywikipedia-bugs@lists.wikimedia.org