Page MenuHomePhabricator

claimit.py conditionals:only add p:foo if p:bar exists
Closed, ResolvedPublic

Description

Please Add this feature. Only add a property if another property of claim exists.


Version: core-(2.0)
Severity: enhancement

Details

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:37 AM
bzimport set Reference to bz67568.
bzimport added a subscriber: Unknown Object (????).

or add it only if property123 is_not_equal Q456

Can you provide a real example of how this would be used?

claimit.py -pagegenerators P21 Q6581097 -onlyif:P31=Q5

bot should not add gender to items which are not instance of homo sapiens

I'd suggest implementing this as a Pywikibot-pagegenerators.py filter.

I agree.

I've proposed this as a GCI coding task: https://www.google-melange.com/gci/task/edit/google/gci2014/5871393535164416 , tentatively naming the new filter "ItemClaimFilterPageGenerator".

T73713 is a very similar problem - there, the script should skip the page/item if it meets certain conditions.

Change 179158 had a related patch set uploaded (by M4tx):
Add ItemClaimFilterPageGenerator

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

Patch-For-Review

Change 179158 merged by jenkins-bot:
Add ItemClaimFilterPageGenerator

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