Page MenuHomePhabricator

Arwiki - commonscat.py
Closed, ResolvedPublic

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.

Event Timeline

alaa renamed this task from Arwiki commonscat.py to Arwiki - commonscat.py.Sep 6 2017, 7:56 PM
alaa added a subscriber: Framawiki.
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.

@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.

Kizule subscribed.

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

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

Kizule removed Kizule as the assignee of this task.Feb 4 2018, 4:02 PM
Kizule removed projects: Patch-For-Review, User-Kizule.
Kizule unsubscribed.
In T175207#3943683, @alanajjar wrote:

@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.

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

Change 508103 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] get commons category from wikibase

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

Xqt claimed this task.