maxlath / wikibase-cli

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

wd ee troubles #93

Closed VladimirAlexiev closed 4 years ago

VladimirAlexiev commented 4 years ago

After adding OAuth tokens:

$ wd data Q95 | wd ee
/cygdrive/c/Users/vladimir.alexiev.000/AppData/Roaming/npm/wb: line 14: 11504 Segmentation fault      node "$basedir/node_modules/wikibase-cli/bin/wb" "$@"

  Usage: wd-edit-entity [options] <data>

  Edit an existing entity

  Options:

    -v, --verbose                make the output more verbose
    -d, --dry                    output the generated data, do not run the query
    -h, --help                   output usage information

If I use an intermediate file:

$ wd data Q95 > data.json
$ wd ee data.json
invalid property id { propertyId: 'hash' }
maxlath commented 4 years ago

wd ee currently doesn't check its stdin, so piped data will be ignored

maxlath commented 4 years ago

as for the intermediary file, wd ee actually expects a simplified format, so it is recommended to use wd generate-template (wd gt):

wd gt Q95 > data.json
# to prepare an edit affecting only P31 claims
wd gt Q95 --props claims.P31 > data.json
maxlath commented 4 years ago

Closing as this issue is inactive. Please reopen if you still have troubles with the latest version.