Page MenuHomePhabricator

claimit and harvest_template - add another value for one property
Closed, ResolvedPublic

Description

Some items needs to have two values for one property.
typical example is p31
instance of castle + instance of cultural monument

harvest_template and claimit should

  • check, if this property exists
  • if no
    • add property with new value
  • if yes
    • check value
    • if same
      • skip
    • if another
      • add another value

(claimit -pagegenerator P31 Q123)

Additionally these script should be able to replace one value with another
(P123: Q123 -> Q456)

(claimit -pagegenerator P31 Q456 -overwrite:Q123)


See Also:
T69284: claimit.py should add another value but not duplicate

Event Timeline

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

Ideally, when there is some parameter like -manual.
If bot found that value exists, there will be possibilities
[r]eplace / [s]kip / [a]dd
(overwrite value / do nothing / add new walue)

without this parameter bot automatically skips.

I think a user-interaction-mode (-manual, or -interactive?) for claimit would be a good GCI (https://www.mediawiki.org/wiki/Google_Code-in_2014) project, but we need to fix the script first (https://gerrit.wikimedia.org/r/#/c/176930).

Change 364475 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[pywikibot/core@master] [IMPR] Enhance argument management in harvest_template.py

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

Change 364475 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Enhance argument management in harvest_template.py

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

Change 370664 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[pywikibot/core@master] [IMPR] Share claimit.py logic with harvest_template.py

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

Change 370664 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Share claimit.py logic with harvest_template.py

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