maxlath / wikibase-cli

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

improve manual: add-reference with multiple statements not possible #103

Closed rwst closed 4 years ago

rwst commented 4 years ago

How to add such a reference? E.g. this only added the first pair:

wd add-reference 'Q4115189$35CA1053-193D-47D2-B080-6DC3E3E42134' P248 Q142667 P813 '+2020-03-13T00:00:00Z/11'

rwst commented 4 years ago

Trying in batch mode is unsuccessful:

ralf@ark:~/wikidata> echo 'Q4115189$8846AB23-2D25-4AAB-A6E5-B750DEAEC381
["P248" "Q142667"]
["P813" "+2020-03-13T00:00:00Z/11"]
' | wd ar --batch
edit group: https://tools.wmflabs.org/editgroups/b/wikibase-cli/1584259421980/
processing line 1: Q4115189$8846AB23-2D25-4AAB-A6E5-B750DEAEC381
missing property { property: undefined }
maxlath commented 4 years ago

for this kind of more elaborated additions, you should probably use wd entity-edit:

// Q4115189.json
{
  "id": "Q4115189",
  "claims": {
    "P31": [
      {
        "id": "Q4115189$cfbe452f-459a-d7b0-f57c-f6d816f33e19",
        "value": "Q1",
        "references": {
          "P248": "Q142667",
          "P813": "2020-03-13"
        }
      }
    ]
  }
}
wd ee ./Q4115189.json
rwst commented 4 years ago

Thanks. I changed the subject accordingly.