maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
226 stars 24 forks source link

somevalue/novalue times work for adding qualifiers, but not updating #73

Closed generalist closed 5 years ago

generalist commented 5 years ago

It looks like the somevalue/novalue functions only work with some of the command types.

wd aq 'Q26722044$EF142B3D-0FE3-4A8F-97B8-2722A6F33BD9' P582 '{"snaktype":"somevalue"}'

This works as expected and adds an "unknown value" P582 qualifier.

wd uq 'Q26722044$EF142B3D-0FE3-4A8F-97B8-2722A6F33BD9' P582 '1848-12-31' '{"snaktype":"somevalue"}'

This throws an error "TypeError: Cannot read property 'replace' of undefined".

I'm not sure from the documentation if this is intended or not (it mentions somevalue/novalue next to add-qualifier, so perhaps it is?)

And thanks as always, it's a great tool :-)

maxlath commented 5 years ago

yes, special snaktypes haven't been implemented everywhere yet: here it's the findSnak that isn't aware of special snaktypes. working on it :)

generalist commented 5 years ago

Awesome - glad to know you have it in hand :-)

Jheald commented 5 years ago

+1 for this. It would be a particularly useful feature to be able to change 'somevalue' to a Qid using wd uq, with the qualifiers and references just carrying over (and for all types, not just for times).

maxlath commented 5 years ago

done! published in v7.5.0