Page MenuHomePhabricator

listpages.py -searchitem should allow type=property
Open, LowPublic

Description

The listpages.py -searchitem hides the type parameter which makes it impossible to look for properties in in wikidata with something like:

python3 pwb.py listpages -lang:test -family:wikidata -searchitem:FLOSS2property

The -type argument should be added to allow

python3 pwb.py listpages -lang:test -family:wikidata -searchitem:FLOSS2property -type:property

The following shows the lower levels of pywikibot already support the parameter:

import pywikibot
site = pywikibot.Site("test", "wikidata")
for e in site.search_entities('FLOSS2property', 'en', type='property'):
    print(str(e))

Event Timeline

dachary renamed this task from listpages.py -searchitem should use -type to listpages.py -searchitem should allows type=property.Sep 8 2016, 3:23 PM
dachary renamed this task from listpages.py -searchitem should allows type=property to listpages.py -searchitem should allow type=property.

This is more a paggenerators issue.
Problem is that coupling args in pagenerators is tricky.
Maybe a solution like:
"-searchitem:lang:text,type" or "-searchitem:lang:text,type=property"
Is it likely that commas might be part of text? Otherwise, another separator?

Xqt triaged this task as Low priority.Sep 24 2018, 7:06 AM