UNPKG

wikibase-cli

Version:

A command-line interface to Wikibase

23 lines (22 loc) 1.04 kB
export default { alias: 'd', args: '<entity>', description: "Output the entity's data", options: { lang: false, verbose: false, clipboard: false, json: false, instance: true, sparqlEndpoint: false, }, examples: [ { args: 'Q123', comment: "Fetch Q123's raw data" }, { args: '--props labels,claims,sitelinks Q123', comment: "Fetch Q123's labels, claims, and sitelinks only" }, { args: '--simplify Q123', comment: 'Fetch Q123 simplified data' }, { args: '--simplify --keep ids,references,qualifiers,hashes,nontruthy Q123', comment: 'Simplified Q123 data, but keep some attributes' }, { args: '--simplify --keep all Q123', comment: 'Same as above' }, { args: 'Q1496 | jq .labels.pt', comment: "Take advantage of the raw data being output as JSON\n # to pass it to jq (a JSON parsers https://jqlang.github.io/jq/)\n # and get only the piece of data you're looking for" }, { args: '--simplify --keep ids Q123 | jq .claims.P138 -j', comment: 'Get Q123 P138 claims ids' }, ], }