Page MenuHomePhabricator

Arwiki - commonscat.py
Open, MediumPublic

Description

Hello, in arwiki now we just put {{تصنيف كومنز}} (={{Commons category}}) in the articles, categories ..etc, then it take the value automatically from wikidata Property:P373.

So when we use commonscat.py it replace the template like this, can we add "if state" to the code to skip articles containing {{Commons category}} (or its redirects)? or what you think?

N.B: many of wiki projects now dependent on wikidata to bring information to the templates.

Related Objects

Event Timeline

alanajjar created this task.Sep 6 2017, 7:55 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptSep 6 2017, 7:55 PM
alanajjar renamed this task from Arwiki commonscat.py to Arwiki - commonscat.py.Sep 6 2017, 7:56 PM
alanajjar added a subscriber: Framawiki.
Framawiki claimed this task.Sep 7 2017, 8:58 PM
Xqt triaged this task as Medium priority.Sep 9 2017, 12:49 PM
Xqt removed a project: Pywikibot.

Hi @alanajjar, thanks for taking the time to report this!
Unfortunately I do not know what code base this task is about
If you have time and can still reproduce the problem: Please add a more complete description to this report (a list of steps to reproduce which leave no room for interpretation what to do, describing actual results and expected results after performing the steps to reproduce, attaching or linking to a public testcase, browser information, MediaWiki version information, etc). You can edit the task description by clicking Edit Task.
Ideally, exact and clear steps to reproduce should allow any other person to follow these steps (without having to interpret those steps) and see the same results. Problems that others can reliably reproduce can get fixed faster. Thanks!

Xqt removed 1 project(s): Pywikibot-core.

I suppose that it's an error.

Thanks @Aklapper for for trying to handle this, but as indicated in description this task is about commonscat.py pywikibot's script.

Framawiki removed Framawiki as the assignee of this task.Sep 9 2017, 8:54 PM

@alanajjar From what I understand you want the script to pass the pages that already have the empty {{تصنيف كومنز}} template, without modifying them, and add it only where it's not already there?
Or do you want the script to fill in the template parameters if they are different from those already present or those on wikidata?
I haven't had the opportunity to use this script yet, so I don't know how it works, but I can try to get on with it.

@Framawiki Thanks for your help.

Yes to pass the pages that already have the empty {{تصنيف كومنز}} template, without modifying them, and add it only where it's not already there, and also to fill in the template parameters if they are different from those already present or those on wikidata.

Zoranzoki21 added a subscriber: Zoranzoki21.

I think to I know what is this. I will try to fix this in patch

Restricted Application added a project: User-Zoranzoki21. · View Herald TranscriptFeb 3 2018, 7:30 PM

Change 407986 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Improvisation of commonscat.py script

https://gerrit.wikimedia.org/r/407986

@JAnD has experiences with adding Commonscat without parameters, maybe he could help

Change 407986 abandoned by Zoranzoki21:
Improvisation of commonscat.py script

https://gerrit.wikimedia.org/r/407986

Zoranzoki21 removed Zoranzoki21 as the assignee of this task.Feb 4 2018, 4:02 PM
Zoranzoki21 removed a subscriber: Zoranzoki21.

@Framawiki any new here?

Hello, doing this config change looks pretty difficult for me, I'll let somebody else that feel fine with it taking this task.

Meno25 added a subscriber: Meno25.Apr 30 2019, 11:56 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 30 2019, 11:56 AM
Xqt added a subscriber: Xqt.Apr 30 2019, 1:54 PM
Meno25 updated the task description. (Show Details)Apr 30 2019, 6:52 PM

Change 508103 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] get commons category from wikibase

https://gerrit.wikimedia.org/r/508103