wikibase-cli
wikibase-cli copied to clipboard
support custom datatypes
Hi!
Thanks for this library - very helpful! :)
I'm trying to add a claim ("P1") to an entity ("Q1") in a Wikibase instance. This instance has its own, custom datatype for "P1" (named "urix").
If I run e.g.
wb add-claim Q1 P1 "test"
... then the response is:
unsupported datatype: urix. Please open an issue at ...
How can I use this library for custom datatypes?
Hi! That's the first time I encounter that problem, so it had not been considered until now for this lib, I'm afraid ^^ The problem comes from wikibase-edit, which doesn't know how to validate and format that unknown datatype
Hi @maxlath Thank you - good to know! Do you have plans to support this feature? Or do you know of a workaround?
Different possibilities:
- wikibase-edit could support declaring custom datatypes in some way: we would need a way to declare a statement builder function for that datatype, or to declare that that custom datatype has the same shape as another known datatype
- you could fork wikibase-edit to add the desired statement builder function, possibly by just aliasing the new datatype to an existing builder, as it already done for most datatypes
Hi @maxlath Thank you, much appreciated!