Last modified: 2013-12-09 11:13:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58774, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56774 - Port commonscat.py to Pywikibot core
Port commonscat.py to Pywikibot core
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Allen Guo
gci2013 https://www.mediawiki.org/wik...
: easy
Depends on: 56873
Blocks: 55880
  Show dependency treegraph
 
Reported: 2013-11-08 13:26 UTC by Strainu
Modified: 2013-12-09 11:13 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Strainu 2013-11-08 13:26:13 UTC
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
Comment 1 pyfisch 2013-11-10 18:15:40 UTC
I will convert the script to core.
Comment 2 Strainu 2013-11-10 18:28:02 UTC
(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.
Comment 3 Andre Klapper 2013-11-10 18:35:28 UTC
If this depends on bug 56873, doesn't bug 56873 need to be fixed first (it's not marked as a GCI task)?
Comment 4 Strainu 2013-11-10 18:40:21 UTC
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.
Comment 5 pyfisch 2013-11-10 19:55:38 UTC
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
Comment 6 JAn Dudík 2013-11-11 08:10:54 UTC
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
Comment 7 Andre Klapper 2013-11-11 11:47:20 UTC
(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.
Comment 8 Strainu 2013-11-11 13:53:34 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links