File: fix-for-commander-9.patch

package info (click to toggle)
node-wikibase-cli 15.15.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,860 kB
  • sloc: javascript: 4,531; sh: 26; makefile: 7
file content (379 lines) | stat: -rw-r--r-- 10,887 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
Description: fix for commander 9
Author: Yadd <yadd@debian.org>
Forwarded: https://github.com/maxlath/wikibase-cli/issues/159
Last-Update: 2022-03-29

--- a/metadata/add-alias.js
+++ b/metadata/add-alias.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'aa',
-  args: '<entity> <language> <aliases>',
+  args: '[entity] [language] [aliases]',
   description: 'add one or several aliases to the list of aliases of an entity in a given language',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/add-claim.js
+++ b/metadata/add-claim.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'ac',
-  args: '<entity> <property> <value>',
+  args: '[entity] [property] [value]',
   description: 'add a claim to an entity',
   options: Object.assign({ rank: true }, editCommands),
   examples: [
--- a/metadata/add-qualifier.js
+++ b/metadata/add-qualifier.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'aq',
-  args: '<claim-guid> <property> <value>',
+  args: '[claim-guid] [property] [value]',
   description: 'add a qualifier to a claim',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/add-reference.js
+++ b/metadata/add-reference.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'ar',
-  args: '<claim-guid> <property> <value>',
+  args: '[claim-guid] [property] [value]',
   description: 'add a reference to a claim',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/aliases.js
+++ b/metadata/aliases.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'a',
-  args: '<entity>',
+  args: '[entity]',
   description: "display the entity's aliases",
   options: require('../lib/common_options').entityAttributeCommands,
   examples: [
--- a/metadata/claims.js
+++ b/metadata/claims.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'c',
-  args: '<entity> [property]',
+  args: '[entity] [property]',
   description: 'display the claims of an entity',
   options: {
     lang: true,
--- a/metadata/config.js
+++ b/metadata/config.js
@@ -1,7 +1,7 @@
 const { grey } = require('chalk')
 
 module.exports = {
-  args: '<key> [value]',
+  args: '[key] [value]',
   description: 'get and set configuration parameters',
   options: {
     lang: false,
--- a/metadata/convert.js
+++ b/metadata/convert.js
@@ -1,5 +1,5 @@
 module.exports = {
-  args: '',
+  args: '[]',
   description: 'convert batches of external ids to Wikidata ids and vice versa',
   options: {
     lang: false,
--- a/metadata/create-entity.js
+++ b/metadata/create-entity.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'ce',
-  args: '<data>',
+  args: '[data]',
   description: 'Create a new entity',
   options: editCommands,
   examples: [
--- a/metadata/data.js
+++ b/metadata/data.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'd',
-  args: '<entity>',
+  args: '[entity]',
   description: "output the entity's data",
   options: {
     lang: false,
--- a/metadata/delete-entity.js
+++ b/metadata/delete-entity.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'de',
-  args: '<id>',
+  args: '[id]',
   description: 'Delete an entity',
   options: editCommands,
   examples: [
--- a/metadata/description.js
+++ b/metadata/description.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'desc',
-  args: '<entity>',
+  args: '[entity]',
   description: "display the entity's description",
   options: require('../lib/common_options').entityAttributeCommands,
   examples: [
--- a/metadata/edit-entity.js
+++ b/metadata/edit-entity.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'ee',
-  args: '<data>',
+  args: '[data]',
   description: 'Edit an existing entity',
   options: editCommands,
   examples: [
--- a/metadata/generate-template.js
+++ b/metadata/generate-template.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'gt',
-  args: '<entity>',
+  args: '[entity]',
   description: "output the pre-formatted item's data optimized for edition with `wd edit-item`",
   options: {
     lang: false,
--- a/metadata/hub.js
+++ b/metadata/hub.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'h',
-  args: '<query>',
+  args: '[query]',
   description: 'Open a web page using the Hub, see documentation: https://tools.wmflabs.org/hub/',
   options: {
     lang: true,
--- a/metadata/id.js
+++ b/metadata/id.js
@@ -1,5 +1,5 @@
 module.exports = {
-  args: '<title>',
+  args: '[title]',
   description: 'get a Wikidata id from a Wikipedia article title',
   options: {
     lang: true,
--- a/metadata/label.js
+++ b/metadata/label.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'l',
-  args: '<entity>',
+  args: '[entity]',
   description: "display the entity's label",
   options: require('../lib/common_options').entityAttributeCommands,
   examples: [
--- a/metadata/lang.js
+++ b/metadata/lang.js
@@ -1,5 +1,5 @@
 module.exports = {
-  args: '<language code or wikidata id>',
+  args: '[code]',
   description: 'identify language code and return associated data',
   options: {
     lang: false,
--- a/metadata/lemma.js
+++ b/metadata/lemma.js
@@ -1,5 +1,5 @@
 module.exports = {
-  args: '<lexeme>',
+  args: '[lexeme]',
   description: "display the lexeme's lemma",
   options: require('../lib/common_options').entityAttributeCommands,
   examples: [
--- a/metadata/merge-entity.js
+++ b/metadata/merge-entity.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'me',
-  args: '<from-id> <to-id>',
+  args: '[from-id] [to-id]',
   description: 'Merge an entity into another',
   options: editCommands,
   examples: [
--- a/metadata/move-claim.js
+++ b/metadata/move-claim.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'mc',
-  args: '<guid|property-claims-id> <target-entity-id> <target-property-id>',
+  args: '[guid|property-claims-id] [target-entity-id] [target-property-id]',
   description: 'move claims from an entity to another and/or from a property to another',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/move-qualifier.js
+++ b/metadata/move-qualifier.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'mq',
-  args: '<guid> [hash] <old-property-id> <new-property-id>',
+  args: '[guid] [hash] [old-property-id] [new-property-id]',
   description: 'move qualifiers of a claim from one property to another',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/open.js
+++ b/metadata/open.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'o',
-  args: '<entity>',
+  args: '[entity]',
   description: "open the entity's page on Wikidata website",
   options: {
     lang: true,
--- a/metadata/query.js
+++ b/metadata/query.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'q',
-  args: '',
+  args: '[]',
   description: "generate and run a simple SPARQL query by passing a statement's subject, property, or object, or a couple of those",
   options: {
     lang: true,
--- a/metadata/remove-alias.js
+++ b/metadata/remove-alias.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'ra',
-  args: '<entity> <language> <aliases>',
+  args: '[entity] [language] [aliases]',
   description: 'remove one or several aliases from the list of aliases of an entity in a given language',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/remove-claim.js
+++ b/metadata/remove-claim.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'rc',
-  args: '<guids>',
+  args: '[guids]',
   description: 'remove claims by their GUIDs',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/remove-qualifier.js
+++ b/metadata/remove-qualifier.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'rq',
-  args: '<claim-guid> <qualifiers-hashes>',
+  args: '[claim-guid] [qualifiers-hashes]',
   description: 'remove qualifiers from a claim',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/remove-reference.js
+++ b/metadata/remove-reference.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'rr',
-  args: '<claim-guid> <references-hashes>',
+  args: '[claim-guid] [references-hashes]',
   description: 'remove references from a claim',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/revisions.js
+++ b/metadata/revisions.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'r',
-  args: '<entity>',
+  args: '[entity]',
   description: "output the entity's revisions data",
   options: {
     lang: false,
--- a/metadata/search.js
+++ b/metadata/search.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'f',
-  args: '<search>',
+  args: '[search]',
   description: 'search entities',
   options: {
     lang: true,
--- a/metadata/set-alias.js
+++ b/metadata/set-alias.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'sa',
-  args: '<entity> <language> <aliases>',
+  args: '[entity] [language] [aliases]',
   description: 'set the list of aliases of an entity in a given language',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/set-description.js
+++ b/metadata/set-description.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'sd',
-  args: '<entity> <language> <description>',
+  args: '[entity] [language] [description]',
   description: 'set a description on an entity in a given language',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/set-label.js
+++ b/metadata/set-label.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'sl',
-  args: '<entity> <language> <label>',
+  args: '[entity] [language] [label]',
   description: 'set a label on an entity in a given language',
   options: require('../lib/common_options').editCommands,
   examples: [
--- a/metadata/sparql.js
+++ b/metadata/sparql.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 's',
-  args: '<file.rq>',
+  args: '[file.rq]',
   description: 'run a SPARQL query and get its JSON output',
   options: {
     lang: false,
--- a/metadata/summary.js
+++ b/metadata/summary.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'u',
-  args: '<entity>',
+  args: '[entity]',
   description: 'display basic information on the requested entity',
   options: Object.assign({ clipboard: false }, entityAttributeCommands),
   examples: [
--- a/metadata/update-claim.js
+++ b/metadata/update-claim.js
@@ -2,7 +2,7 @@
 
 module.exports = {
   alias: 'uc',
-  args: '<guid> <new-value>',
+  args: '[guid] [new-value]',
   description: "update a claim's value",
   options: Object.assign({ rank: true }, editCommands),
   examples: [
--- a/metadata/update-qualifier.js
+++ b/metadata/update-qualifier.js
@@ -1,6 +1,6 @@
 module.exports = {
   alias: 'uq',
-  args: '<claim-guid> <property> <old-value> <new-value>',
+  args: '[claim-guid] [property] [old-value] [new-value]',
   description: 'update a qualifier from an existing value to a new value',
   options: require('../lib/common_options').editCommands,
   examples: [