[06:13:05] Change abandoned: John Erling Blad; "For now, .." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/16965 [09:25:06] in regards to the api, it seems changes have to be part-by-part, e.g. first language links, then descriptions, etc. is there a way to batch changes? [09:41:56] yes, through setitem the whole item can be set at once [09:42:08] ^joancreus [10:04:00] Denny_WMDE: but wasn't that something to-be-deprecated and only for creating? [10:05:27] joancreus: i think not due to the batch changes. it was recently updated quite a bit. [10:05:45] Denny_WMDE: another thing->it seems you can either 1) create a new item 2) remove it and 3) extend it. how do you remove, for example, one link? [10:06:01] you can't specify it everything except for the one you want to remove, because you'd be extending it [10:07:33] if you want to remove one link you could use wbsetsitelink with an empty title. this is not described in the api, i will note that down [10:08:21] furthermore, the following bug is probably for you interesting to watch, although we wont be touching it this week: https://bugzilla.wikimedia.org/show_bug.cgi?id=38843 [10:09:09] ok, it was just to know if there was a batch way to remove stuff [10:11:14] i think wbsetitem will be able to do that in the future [10:11:23] ok, thanks! [10:11:31] i'm developing pywikidata :) [10:11:38] ahh many many thanks to you [10:11:51] i have used your code often, with lots of joy, and with much gain [10:12:15] nono, i'm also a pywikipedia user [10:12:18] but not a developer [10:12:22] by now it is a side-project [10:12:26] maybe i'll try to integrate it later [10:12:34] ok, cool :) [10:12:43] misunderstood [10:12:50] https://github.com/jcreus/pywikidata <-- old verison, locally it can do stuff right now [10:13:05] the interface is something like [10:13:36] in the end i think there are two ways to use wikidata through an api: either use the modules and do all one by one, or have a local reflection of the item, work on that, serialize it, and then send it around through wbsetitem [10:13:38] l = wikidata.api.getItemsById([314,42]) [10:13:42] and that is a list of Item() objects [10:13:47] which can be edited like [10:13:57] item.sitelinks["ca"] = "blah" [10:14:00] and then [10:14:03] item.save('blah') [10:14:07] perfect! [10:14:45] i think it'll be easier to download the full document, and upload it all [10:15:06] the library will not be as complex, and there'll be less edits [10:24:21] yes, i expect this to become possible [10:44:29] New patchset: Daniel Kinzler; "Undo for items [DO NOT MERGE]" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17057 [11:42:29] New review: Daniel Kinzler; "Please rebase and change ApiLinkTitleTest to make use of the new functionality in ApiModifyItemBase ..." [mediawiki/extensions/Wikibase] (master); V: 0 C: -1; - https://gerrit.wikimedia.org/r/16819 [11:52:09] Change merged: Daniel Kinzler; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/16775 [11:53:54] Change abandoned: Daniel Kinzler; "Rewrite in progress" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/15675 [13:18:59] hmm is it possible that +\\ is an API token? :S [13:23:36] it is somehow always returning this [13:23:45] the example had a has, >then< +\\ [13:26:09] joancreus: it's not a valid token [13:26:14] are you logged in? [13:26:34] ohhhh [13:26:44] it was that [13:27:03] there was success: 1 ? [13:27:24] yay! [13:27:35] maybe for the future an error message would be helpful ;) [13:27:45] sure [13:27:55] i need a token for each action, don't i? [13:28:01] joancreus: can you file a bug report please? i fear it'll get forgotten otherwise [13:28:02] it's general behavior across mediawiki api [13:28:10] token only for editing, etc. [13:28:18] no recycling, you global-warmers! [13:28:18] for wbgetitems, no token required [13:28:25] lol [13:28:31] ok, thanks a lot [13:28:35] * joancreus bugzilla time [13:28:36] sure [13:29:29] thx joancreus :) [13:30:49] aude: i guess it's wikidatarepo, or just wikidata? [13:30:56] (in bugzilla) [13:31:23] joancreus: wikidata repo [13:31:52] what Lydia_WMDE says [13:32:17] althought it's also a general mediawiki api issue [13:33:53] e.g. http://en.wikipedia.org/w/api.php?action=tokens&format=json [13:52:34] New patchset: Jens Ohlig; "Undo for items [DO NOT MERGE]" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17057 [14:51:56] New patchset: Daniel Kinzler; "fixed class name of ApiGetItemsTest" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17521 [14:53:51] New patchset: Daniel Kinzler; "enable test for sitelinks/urls option in wbgetitems" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17522 [14:56:01] New patchset: Jens Ohlig; "Undo for items [DO NOT MERGE]" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17057 [14:58:15] is there a way to, using action=wbsetitem, batch remove fields? i would find useful an action which, instead of extending as wbsetitem does, would replace the content by the new one provided. i can't recall if i asked Denny_WMDE before and i lost the log . thanks! [15:00:25] we will probably change the behavior of wbsetitem to reflect that, but this is still up to discussion. See: https://bugzilla.wikimedia.org/show_bug.cgi?id=38843 [15:00:40] right now it is not possible, i think, but i am not completely sure [15:01:12] yes, i think you're right. i performed some tests before [15:01:56] hmm, found in the bug report: "If set to an empty value, the respective entry is removed." [15:01:58] will try [15:06:20] hmm, it seems everything works fine (setting to empty removes) except for sitelinks [15:17:38] Change merged: Aude; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17521 [15:35:56] New patchset: Daniel Kinzler; "Test handling of malformed json by wbsetitem." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17528 [15:37:16] New patchset: Daniel Kinzler; "Use correct sites in ApiSetSiteLinkTest" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17529 [15:47:17] New review: Daniel Kinzler; "Can be merged as is, but I would prefer to see the improvements I suggested inline." [mediawiki/extensions/Wikibase] (master); V: 1 C: 1; - https://gerrit.wikimedia.org/r/17431 [15:57:19] aude: https://gerrit.wikimedia.org/r/#/c/17431/3 [16:00:04] Change merged: Daniel Kinzler; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17172 [16:00:08] New review: Aude; "I think some warning output is needed if props=sitelinks/url is selected but not sitelinks." [mediawiki/extensions/Wikibase] (master); V: 0 C: 0; - https://gerrit.wikimedia.org/r/17431 [16:00:22] New review: Aude; "I think some warning output is needed if props=sitelinks/url is selected but not sitelinks." [mediawiki/extensions/Wikibase] (master); V: 0 C: 0; - https://gerrit.wikimedia.org/r/17431 [16:02:41] Change merged: Aude; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17522 [17:19:31] New patchset: Daniel Kinzler; "Undo for items [DO NOT MERGE]" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/17057 [23:08:43] New review: awjrichards; "Please abandon this changeset and resubmit when ready for review and merge." [mediawiki/extensions/Wikibase] (master); V: 0 C: -2; - https://gerrit.wikimedia.org/r/16735