User talk:Maxlath

From Wikidata
Jump to navigation Jump to search

Aloes. The definitive guide (Q15056640)[edit]

Hi! Please do not add not existing values for ISBN-10 (P957) The book was published in 2011 and there is only a value for ISBN-13 (P212). --Succu (talk) 19:27, 28 May 2017 (UTC)

@Succu: sorry, I thought both value where legit. I did add quite a lot of them already, I can work on removing those added to items with a publication date set to after the 1st January 2007, does that seems like the right thing to do at this point? -- Maxlath (talk)
Now you have added incomplete descriptions to this and other works. This book has more than one author. Please check your edits. --Succu (talk) 07:48, 5 December 2017 (UTC)
[1]?! --Succu (talk) 07:22, 13 December 2017 (UTC)
[2] -- Maxlath (talk) 09:46, 13 December 2017 (UTC)

Wikisource editions[edit]

Hi. To note that when they initially put the Wikisource works into Wikidata, the bot went through and called them all books, and labelled them as such. Subsequently the Wikidata project has given criteria for published works, and what we have at Wikisource is generally editions, especially as we can reproduce multiple editions of the same work. Slowly slowly we are fixing up those early additions.  — billinghurst sDrewth 23:02, 28 November 2017 (UTC)

@billinghurst: sorry, this was an automate edit I programmed yesterday: I was tired of always falling back on the Dutch description of "boek van [author name]" for all books that had only that description, so I wrote a tasks queue to add "book by [author name]"@en and "livre de [author name]"@fr to the entities that already have the Dutch description but no English/French description. Unfortunately, I didn't anticipate the case that someone could add a description between the moment my SPARQL query found it missing and the queue actually comes to it :s — Maxlath (talk) 23:45, 28 November 2017 (UTC)


Stop vandalizing Wikidata. Varlaam (talk) 00:42, 3 January 2018 (UTC)

@Varlaam: None of my edits are done with the intent to vandalize, if you consider some of my edits as contestable, feel free to notify, cancel, or override them as some people did above. But do not start with insults, why starting with insults? what kind of asshole would start a discussion on one contested edit with insults?!? Please correct your title and comment or go to hell -- Maxlath (talk) 09:10, 3 January 2018 (UTC)

Descriptions étranges[edit]


Je vois que tu as ajouté des descriptions en anglais, allemand et espagnol sur Q27918987. Sur le principe, c'est génial, merci ; dans la pratique, tu as pris seulement le premier auteur pour ce livre qui en compte une vingtaine :/ Pourrais-tu jeter un coup d’œil et corriger cela ?

Cdlt, VIGNERON (talk) 17:04, 21 January 2018 (UTC)

Salut, oui j'ai traduis des descriptions en néerlandais pour beaucoup de livres (uniquement dans les cas où aucune description pré-existait dans la langue cible), sans, malheureusement, re-vérifier leur validité, d'où un pourcentage faible mais non-nulle de descriptions peu satisfaisantes : je corrige progressivement celle que je remarque ou qu'on me fait remarquer. Désolé pour le dérangement -- Maxlath (talk) 17:50, 21 January 2018 (UTC)
Pas de problème et encore merci pour tout ton travail ! VIGNERON (talk) 17:57, 21 January 2018 (UTC)
avec plaisir :) -- Maxlath (talk) 20:48, 21 January 2018 (UTC)


Salut Maxlath,

juste pour information, cette modification a introduit une faute de typographie. Je suis donc revenu en arrière.

Nomen ad hoc (talk) 12:54, 31 March 2018 (UTC).

ok, merci -- Maxlath (talk) 13:15, 31 March 2018 (UTC)

Bad references[edit]

You have added a lot of dates-as-references to people's Twitter accounts, like this. That is not correct a correct use of the reference field. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:14, 18 May 2018 (UTC)

hi @Pigsonthewing:, I wasn't sure that it was the right way to do that, but do you see an alternative way to tell the retrieved (P813) value of a qualifier such as number of subscribers (P3744) (as added here)? Isn't it better to have this date in reference, rather than this member count without any date to precise when it was true? -- Maxlath (talk) 13:23, 18 May 2018 (UTC)
No; I suggest you seek guidance on Wikidata:Project chat. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:28, 18 May 2018 (UTC)

Date pour Twitter username (P2002) et number of subscribers (P3744)[edit]


Je vois que tu ajoutes number of subscribers (P3744) en qualificateur de Twitter username (P2002), c'est une excellente chose. Je ne suis pas souvent tombé sur ce qualificateur mais je suis un peu étonné de voir retrieved (P813) en référence et je me demandais si point in time (P585) en qualificateur ne serait pas plus approprié. Qu'en penses-tu ?

Cdlt, VIGNERON (talk) 11:12, 21 May 2018 (UTC)

PS: je ne vois qu'après coup le message ci-dessus. Effectivement, il faudrait aller sur le project chat pour avoir plus d'avis ;)

Bonjour. Je n'ai pas vu de sujet sur le Project Chat, donc je commente ici. Je suis d'accord avec Andy Mabbett : une date de consultation n'est pas une référence. Et j'irai plus loin que VIGNERON : il faudrait conserver les valeurs de chaque relevé ; cela permettrait de connaître les évolutions, comme pour la population d'une ville (exemple). La modélisation est probablement à réfléchir pour avoir quelque chose de générique et éviter une propriété par réseau social... En tout cas, merci pour cet import (je pense que tu peux le terminer, ce devrait être facile à corriger avec un bot lorsqu'une meilleure modélisation aura été choisie). — Envlh (talk) 13:44, 21 May 2018 (UTC)

Wikidata (Q28361946)[edit]

Salut, J'aimerais savoir s'il serait possible que tu fasses quelques modifications (si necessaire) pour ce wikidata s'il te plaît : (Q28361946) Il n'y a pas encore de Knowledge Graph (avec sa ville de naissance et sa 'profession', il n'y a que sa date de naissance) sur Google en tapant son nom, du coup je voulais savoir s'il n'y avait pas un moyen pour avoir un vrai knowledge graph plus rapidement. Merci! :) Adv75 (talk) 23:34, 28 May 2018 (UTC)

Turning books (Q571) into written works (Q47461344)[edit]

Dear you, possibly coming to this discussion page to discuss a change I made from book (Q571) to written work (Q47461344), before creating a new entry, here is some context:

-- Maxlath (talk) 06:07, 30 November 2018 (UTC)

@Maxlath: thanks for the explanation, and for starting to tackle this hairy issue! A few remarks:
  • While I’m sure you discussed this with some WikiCite participants, not everyone attends this conference, so it would’ve been useful to write this explanation before starting the edits, and link to it in the edit summary, so you wouldn’t have dozens of users (wild guess) ask what you’re doing :)
  • Q571 (book) is currently a subclass of Q47461344 (written work), which is why I find it tempting to revert your change. I acknowledge that a move like this, to distinguish between proper work items and muddled work/edition/whatever items, is necessary; however, eventually we’ll probably want to change those statements again, from Q47461344 to some more specific class (not necessarily Q571). Do you have any plans for that? Because as far as I can tell, written works which used to be books are now mixed up with written works of other kinds, and I’m not sure if it’ll be easy to tell them apart again in future.
  • Is there some place where this migration is being discussed that I’m not aware of?
Galaktos (talk) 23:45, 2 December 2018 (UTC)
Is it OK to use literary work (Q7725634) instead of written work (Q47461344) where it seems to be more appropriate (e.g. Parmenides (Q1130762)? --Epìdosis 11:11, 3 December 2018 (UTC)
@Epìdosis:: I guess that as long as we P31 value conveys the idea that it is a Work item, that's acceptable(?) -- Maxlath (talk) 21:44, 3 December 2018 (UTC)
@Galaktos:: Hairy indeed ^^
-- Maxlath (talk) 21:44, 3 December 2018 (UTC)
Adding to Epidosis replic: all changes in my watchlist from book (Q571) to written work (Q47461344) look strange. I believe they all should be literary work (Q7725634) (or at least 95-99%). --Infovarius (talk) 09:53, 4 December 2018 (UTC)


Hi, I do not think that adding Spanish book ISBN entries (like here) to a French book work item is a good idea. Such changes may propagate erros if somebody decides to add some more info basing on the ISBN data in future. Ankry (talk) 09:02, 17 December 2018 (UTC)

@Ankry: [sorry for the delayed answer] that was part of a batch of edits where I added ISBN-13 (P212) values to every item with a ISBN-10 (P957), as you can deduce one from the other. Having ISBNs on Works is a problem in general as those belong to Editions, but we struggle with getting out of it: I removed that one, but ideally we should probably remove all ISBNs from Works. May that day come ^^ -- Maxlath (talk) 18:12, 2 January 2019 (UTC)
I 100% agree. Ankry (talk) 18:13, 2 January 2019 (UTC)

I updated floss (Q55135808)[edit]

Let me know what you think ·addshore· talk to me! 14:31, 2 January 2019 (UTC)

@Addshore: wooh nice! for a moment I though that the P18 was your very own ^^ -- Maxlath (talk) 18:03, 2 January 2019 (UTC)


Hi Maxlath. I need your help. Are you able to partially revert this edit please? I need the P516 values on the sandbox, as we're still working on a complex infobox. Are you able to restore that part please? Rehman 11:38, 20 May 2019 (UTC)

@Rehman: Hi! I took a bit of work to get there, but it's done! :) Maxlath (talk) 11:01, 24 May 2019 (UTC)
Thank you, Maxlath. Appreciate your help :) Rehman 11:30, 24 May 2019 (UTC)

Property proposal[edit]

Hi Maxlath,

As you added some of the data, maybe you want to comment on Wikidata:Property_proposal/subscribers. --- Jura 17:19, 4 July 2019 (UTC)

I kind of gave up on the idea of tracking subscribers counts in Wikidata, as the only data model that could fit (out of very special cases where the account/channel is the item, e.g. r/science (Q24207151)) is a qualifier of qualifier. I did express my lost faith here Wikidata:Property_proposal/Number_of_twitter_follower, but I don't want to be blocking in case people come up with a good work-arounds. I do think that having a subscribers property per year isn't very elegant though :( If at some point, there was a consensus that we should just remove subscribers data for cases where a time sequence is impossible, I would be up for cleaning up the mess I created. -- Maxlath (talk) 22:33, 4 July 2019 (UTC)
It's actually interesting data to have and an annual frequency should be sufficient. I gave up on the idea of an elegant solution. Thus the proposal. --- Jura 22:37, 4 July 2019 (UTC)
BTW, what do you think of option D1? It would be good to have a bot that collects that data on a monthly basis. --- Jura 12:56, 13 July 2019 (UTC)

Amir Hetsroni (Q12404037)[edit]

Hello Maxlath,

Please pay attention that your addition there is impersonation of a Twitter account, thus I removed this Identifier. Thanks, Matankic (talk) 15:37, 27 July 2019 (UTC)

My regrets, it wasn't you whom linked this profile. Matankic (talk) 15:42, 27 July 2019 (UTC)

Statements to change to depreciated rank[edit]

Hi Maxlath,

This query returns the list of statements I need to set to depreciated rank:

It would be fantastic if you are able to help with this.

Cheers, Simon Cobb (User:Sic19 ; talk page) 13:25, 27 October 2019 (UTC)

Confusing edit[edit]

Why did you remove this? —Justin (koavf)TCM 18:10, 3 February 2020 (UTC)

@Koavf: having subscribers count in qualifiers doesn't work as you can't add qualifiers and references, such as a point in time, to that qualifier. This results in those subscribers count being just outdated data, with one point in time. The different attempts to work around this issue, such as Wikidata:Property_proposal/subscribers, were not convincing in my opinion. See also Wikidata:Requests_for_permissions/Bot/SilentSpikeBot. Therefore, I went on to cleanup the mess I created by mass adding subreddit subscribers counts, as for Q6097, and proceeded to remove those subscribers counts on P3984 statements. -- Maxlath (talk) 19:55, 3 February 2020 (UTC)
Merci. —Justin (koavf)TCM 23:34, 3 February 2020 (UTC)

Batchmode in Wikibaseclient[edit]

Hello Maxlath,

I add Descriptions to Wikidata and for that I use QuickStatements. I read something about the Wikibaseclient and a Batchmode there and after there is sometimes a bigger Lag in Wikidata I look for ways that the work I do is more efficient and better for the infrastructure of Wikidata and the WikimediaProjects. As far as I have understand is the Wikibaseclient a possibility to make it more efficient. Is it possible and allowed to run a bot with the Wikibaseclient in Batch mode. I am not a programmer and I work a lot with Spreadsheets and I think that it is possible for me to create a batch with the commands as needed but I am not able to install the Wikibaseclient at the moment. I need to learn some things about command lines before I can install it. -- Hogü-456 (talk) 20:15, 17 March 2020 (UTC)

@Hogü-456: wikibase-cli could be faster than QuickStatements, partly because it makes less checks: for instance, it won't check if a given claim value already exists, it will just follow the instruction to add it, and might thus create duplicated claims. By letting this responsibility to the users, wikibase-cli needs less requests and can thus go faster. Also, wikibase-cli uses a maxlag value of 5 by default, which means that it will pause for 5 seconds if the server is lagging too much. It should thus be ok to use it for a bot. -- Maxlath (talk) 10:01, 18 March 2020 (UTC)

Written work or literary work[edit]

Hi Maxlath,

I was hoping maybe you can help clarify when to use literary work (Q7725634) and when is written work (Q47461344) more appropriate? I don't seem to get why for example The Hours (Q2610868) is an instance of (P31) of written work but Harry Potter and the Philosopher's Stone (Q43361) is literary work.

Thanks for all the great work on books! Keren - WMIL (talk) 18:56, 21 May 2020 (UTC)

Hi @Keren - WMIL:, I'm unfortunately not totally able to answer. I contributed to an effort to replace P31:Q571 by P31:Q47461344 to make the distinction between works and editions explicit. But while some would like to keep all instances of work with a unique P31 value (like all humans have a P31:Q5 claim), as that makes the data easier to work with, there is also a trend, that some go as far as calling consensual, to consider that "any subclass of [Q47461344] is acceptable". According to the later, you would then be invited to change P31:Q47461344 into P31:Q7725634, or other subclasses Q47461344, when it seems appropriate. I personally still feel uncomfortable with this state of things, as in absence of a P31:Q5 equivalent, it's increasingly difficult to work with bibliographic data in Wikidata :/ -- Maxlath (talk) 07:21, 22 May 2020 (UTC)

Trato vejatorio[edit]

¿Usted encuentra gracioso esto? No es un apodo, no es verdad que en España reciba ese apodo, es un escarnio a una persona asesinada. --Enrique Cordero (talk) 11:36, 30 May 2020 (UTC)

@Enrique Cordero: Entiendo que se trata de un tema delicado, pero me pareció que la declaración era posible, dado que hay referencias a su uso. De la misma manera, es posible afirmar que Earth (Q2):shape (P1419):disk (Q238231): esta afirmación la hacen ciertas personas, y se pueden encontrar referencias para defenderla. Esto no significa que sea cierto o legítimo: "Debido a que las declaraciones esencialmente apuntan a fuentes de información referenciables y diferentes fuentes pueden proporcionar información contradictoria, es posible representar una pluralidad de perspectivas en Wikidata." Pero no sé mucho al respecto y no insistiré si se elimina. (perdón por los errores de lenguaje, usé un traductor) -- Maxlath (talk) 12:39, 30 May 2020 (UTC)
La referencia es la afirmación de una bloguera y la referencia es también un blog; eso no implica que sea un apodo de uso corriente, es la ocurrencia de esa señora, una ocurrencia despreciable e indigna por vejar a una víctima del terrorismo, algo con lo que creo deberían hacerse pocas bromas; sacada de contexto y convertida en categoría no es un apodo, es una afrenta. Yo sí insistiré en que se borre. No se apuré por errores de lenguaje, agradezco su esfuerzo en la comunicación. --Enrique Cordero (talk) 12:55, 30 May 2020 (UTC)

We sent you an e-mail[edit]

Hello Maxlath,

Really sorry for the inconvenience. This is a gentle note to request that you check your email. We sent you a message titled "The Community Insights survey is coming!". If you have questions, email

You can see my explanation here.

MediaWiki message delivery (talk) 18:46, 25 September 2020 (UTC)


Hi Maxlath,

Experimenting with your cli tool, I tried to do a few edits. Nice tool. Is there a way to add a statement including a qualifier and a reference in a single edit to an existing item (I try to avoid retrieving statement uuids)? In the sample, I just found one for statements without qualifiers/references. I think I got the json together for wikibase-edit, but didn't figure out how to use it with cli. --- Jura 09:12, 19 October 2020 (UTC)

In the meantime, I think I figured it out, notably thanks to the separate samples. The main doc seems to lack "return" at some point. Awesome tool. --- Jura 09:52, 19 October 2020 (UTC)
@Jura1: Glad you like it :) can you point me to where the "return" is missing? -- Maxlath (talk) 11:13, 19 October 2020 (UTC)

In write_operations, there is a section "Pass data as a dynamic JS function file returning an object". Maybe the sample "// add_P1449_and_P1106.j" there works as given, but I ended up using

module.exports = (id, hay, color) => {
  return {
    id: id,
    claims: {
      P2827: {
	qualifiers: {    P1932: color  },
        references: [ { P248: 'Q96634446', P8662: hay } ]

In the section "Pass data as a static JS object file" just above, maybe sample needs the same. BTW, is there a way to set the edit summary in the template? --- Jura 11:36, 19 October 2020 (UTC)

@Jura1: the documentation was using arrow function implicit return, I updated it to use explicit returns instead.

You should be able to specify the summary from the returned object:

module.exports = (id, hay, color, summary = 'summary by default') => {
  return {
    id: id,
    claims: {
      P2827: {
	qualifiers: {    P1932: color  },
        references: [ { P248: 'Q96634446', P8662: hay } ]
    summary: summary

-- Maxlath (talk) 12:53, 19 October 2020 (UTC)

Thanks. I managed creating an item with it (Q100605113). Maybe, eventually, I will find my way around js. In the documentation, I'd cross reference "Pass data as a dynamic JS function file returning an object" from the sections about qualifiers and references (i.e. for creating statements with qualifiers or references). Currently one could get the impression that getting the uuid is a precondition. Maybe generate-template should use the explicit syntax for js too. I will try to find a short sample for wb create-entity from a js template. --- Jura 19:32, 19 October 2020 (UTC)
I changed the output of
wb generate-template
to the explicit return syntax in v15.3.1, and also added documentation on
wb generate-template --create-mode
, which can be used to easily get rid of the uuids. Unfortunately, it's hard to remove the bareer of having to edit some JS: feel welcome to ask for help :) -- Maxlath (talk) 22:48, 19 October 2020 (UTC)
Indeed, create-mode makes it even easier, even if some barriers keep one's mind busy ;)
I think there are couple of users that could benefit from using cli instead of whatever they are using now. Maybe I can convince one of them to use it.
If you want to include a short "create item" sample with js, maybe the following can do:
// create a file "wd-person.js" with the below
// then run it in cli with:
// wd create-entity wd-person.js "John Doe" "James John Doe"

module.exports = (name, alias) => { return {
  labels: {
    en: name,
    es: name,
    fr: name,
    it: name,
    pt: name,
    sv: name,
    nl: name
  aliases: {
    en: alias,
    nl: alias
  claims: {
    P31: {
      // human
      value: 'Q5',
  summary: "a previously missing totally notable person" 
BTW There is some bug in the most recent version in git, so I had to go back to the previous one. --- Jura 08:11, 20 October 2020 (UTC)
I added that person template to the list of demo examples for wb create-entity.
I also published a new patch version (v15.3.2) that update some dependencies that might have been the reason for those bugs: could you file bug reports if those bugs remain? -- Maxlath (talk) 11:17, 20 October 2020 (UTC)
Thanks. I ran "npm install -g wikibase-cli@latest", it's the generate-template function that fails (only, I think). There is indeed some dependency problem. I suppose I should check if it isn't an internal problem before reporting its details publicly. --- Jura 14:32, 20 October 2020 (UTC)
"UnhandledPromiseRejectionWarning: TypeError: formatJsObj(...).trimStart is not a function at module.exports" might the the relevant part of the error. It only happens on "generate-template".--- Jura 10:25, 22 October 2020 (UTC)
oh, indeed trimStart is available only from NodeJS v10, I refactored to get rid of it: that should be fixed in v15.3.3. -- Maxlath (talk) 15:03, 22 October 2020 (UTC)
Thanks. It works now.
To test, I tried one that had a date value (for Q85722307) and generate-template was missing value: { }. --- Jura 16:46, 22 October 2020 (UTC)
@Jura1: I didn't mention it before, as the documentation is already quite a lot to chew, but you might be interested in the batch mode, as it will give you all the goodies of toolforge:EditGroups, as well as some performance boost -- Maxlath (talk) 13:51, 26 October 2020 (UTC)
I should give it a try, but I tend to hit the max number of edits even without. --- Jura 07:55, 6 November 2020 (UTC)

BTW, I tried to add a conversion from string to monolingual text in move_commons.js . Sample use: wd mc Q27185#P969 Q27185 P6375

It would finish what's left over from the the conversion to P6375 (using language code "und").

  'string->monolingualtext': snak => {
    snak.datatype = 'monolingualtext'
    snak.datavalue.type = 'monolingualtext'
    snak.datavalue.value.language = "und"

I tried the above with some variations .. and get also sort of error messages. --- Jura 07:55, 6 November 2020 (UTC)

The string value is a direct string value, while for a monolingualtext value, its an object with a text and a language; so maybe with
 'string->monolingualtext': snak => {
   snak.datatype = 'monolingualtext'
   snak.datavalue.type = 'monolingualtext'
   snak.datavalue.value = {
      text: snak.datavalue.value,
      language: 'und'

Otherwise, as there is currently no way to pass that custom language from the command line, you could use this process:

Thanks for your help. I almost got to the bottom of this .. now it hangs on the choice of the language code for some of the remaining. --- Jura 09:47, 5 December 2020 (UTC)

cli uc[edit]

Hi Maxlath,

To adjust ranks, I tried something like:

wd uc 'Q13406268$0386121F-67D7-4F54-84B1-E446C0C97A90' --rank preferred

but it throws an error. I did work when I changed the value at the same time [3]. Maybe I just messed up my installation. If it works, a request like [4] could be handled.

Also, to set preferred rank to most statements at Q145#P463, I had tried the following:

wd uc $claim_guid 'Q13406268$0386121F-67D7-4F54-84B1-E446C0C97A90|Q13406268$177FFE69-4509-481B-A267-3B2291A99DFC|Q13406268$23AD8B78-D5DB-4548-A772-4A602A77EB5D|Q13406268$40733430-20E0-4A84-8319-D00F7212F8C7|Q13406268$54235FA2-4A5C-4DC3-AC25-F0CA9BFA1AC6|Q13406268$5514F1A4-D46C-4C19-A197-E958F914213B|Q13406268$913D4EA8-0550-48F8-9340-05FCEC1705CF|Q13406268$D5FF99FC-FAE6-4F3E-9240-24FFC881F00C|Q13406268$E06AB153-9FA2-4DFB-9BA5-4923797936B7' --rank preferred

but it didn't work either. Maybe $claim_guid isn't possible there. --- Jura 09:47, 5 December 2020 (UTC)

@Jura1: That was a bug, now fixed in wikibase-cli v15.8.5.

As for the batch, I would recommend doing it with a file:


You can then call it like this

cat ops | wd uc --batch --summary 'setting P369 rank to preferred'

which generated the following edit group .

Note that you could also just make a list of claim GUIDs


and passing the rank as an option

cat ops | wd uc --rank preferred --batch --summary 'setting P369 rank to preferred'

but then you loose the possibility to set different ranks on each claim. This generated the following edit group -- Maxlath (talk) 17:05, 6 December 2020 (UTC)

Thanks for looking into this. The first one now works. I was hoping to find a way to do everything in one edit as Q145#P463 has dozens of statements to correct. It should more like Q155#P463.
As an alternative, I also tried wd generate-template Q145 > uk.js and then edit the js to add , "rank": "preferred" after most P463 claim ids, but that generates an error when using wd ee uk.js with it. --- Jura 23:17, 6 December 2020 (UTC)
what's the error you get? -- Maxlath (talk) 08:58, 7 December 2020 (UTC)

For the first (all guid in one edit), it's:

old and new claim values can't be the same { oldValue: undefined, newValue: undefined }

For the second (manual edit of uk.js), it's:

TypeError: datatypeTests[builderDatatype] is not a function

--- Jura 09:43, 7 December 2020 (UTC)

BTW, the second error also happens when I don't edit uk.js at all. On a simpler item, it works [5]. --- Jura 09:53, 7 December 2020 (UTC)
This is likely due to missing support for the datatype of some properties on Q145, that should have been fixed with the added datatypes in wikibase-cli v15.10.1. I would also recommand to tailor the template to only the claims properties you want to edit, which can be done by setting the -p,--props flag: wd generate-template --props P463 Q145. -- Maxlath (talk) 12:56, 3 January 2021 (UTC)
  • I tried approach without manual edits also elsewhere: Q38 - same error, Q45 - invalid globecoordinate value error, Q42 - this reset of ranks. --- Jura 18:41, 7 December 2020 (UTC)

cli ar[edit]

Hi Maxlath,

Still a big fan your code. Today I tried to add references based on the sample

wb ar ./reference.js 'Q63313825$A42967A6-CA5B-41AD-9F1F-3DAEF10DDBB5' Q53556514 000011361

It seems that guid part in the sample js isn't working anymore. It throws an error "invalid property id { propertyId:".

A few other points:

  • I can't seem to add dates with decade precision. The format generated by "gt" doesn't seem to feed back in. At least in the version I'm currently using.
  • Is there a code sample for "ee" that illustrates how to check if a statement is present and only adds a statement with the same property if it's absent or depending on the value of another property? --- Jura 15:14, 17 March 2021 (UTC)
  • The error comes from wikibase-edit not being able to find the desired property, which in most case is due to the wrong Wikibase instance being targeted. In the example, the implicit instance is wb ar ./reference.js 'Q63313825$A42967A6-CA5B-41AD-9F1F-3DAEF10DDBB5' Q53556514 000011361 --instance or simply wd ar ./reference.js 'Q63313825$A42967A6-CA5B-41AD-9F1F-3DAEF10DDBB5' Q53556514 000011361. To make this kind of instance mistake easier to identify wikibase-cli v15.10.5 now logs the property id not found and the instance.
  • As for how to check if a statement already exists, I added an example here, but ideally, there should be an option to have it done internally by wikibase-edit, given how common this problem is (for instance, that would solve one of the missing features in quickstatements-to-wikibase-edit), but that would add a fair share of complexity. I might give it a try, but can't promise anything yet. -- Maxlath (talk) 13:12, 10 April 2021 (UTC)