https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
Web browser: --- Bug ID: 55148 Summary: update wikipdata's item one time! Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1589/ Reported by: reza1615 Created on: 2013-02-27 10:18:28 Subject: update wikipdata's item one time! Original description: Now if we want add data below we should edit item 5 times! it will crowded and messy the history (imagine updating item with 60 interwikis!)
lang:en >label:foo lang:de >label:foo lang:fa >label:foo labe:ru >label:foo lang:nl >;abel foo
setitem should accept item in this style items=[{lang:en,label:foo},{lang:de,label:foo},{lang:fa,label:foo},{lang:ru,label:foo},{lang:nl,label:foo}] also for wikilinks and descriptions and aliases.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- - **summary**: update wikipdata's items one time! --> update wikipdata's item one time!
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- http://wikidata.org/w/api.php API doesn't let changing of an existing item at once About creating it's possible
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- it lets ! http://www.wikidata.org/w/index.php?title=Q794445&diff=prev&oldid=79... done by api with [[mediawiki:gadget-slurpInterwiki.js]]
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #4 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- http://www.wikidata.org/w/index.php?title=Q794445&diff=7988999&oldid...
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #5 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I done this edit by wikidata.py library and it supports one edition for adding many labels and langs in a item updating but it's item creation has bug so now I should use wikipedia.py for create and wikidata.py for updating! it is difficult because wikidata.py has it's own user_confing.py and settings :)
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #6 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- In wikipedia.py, I made createitem accept one more parameter which is a dictionary called 'value', and change variable params to
params = { 'summary': self._encodeArg(summary, 'summary'), 'format': 'jsonfm', 'action': 'wbeditentity', 'data': re.sub(ur"\bu'", u'"', repr(value).decode("unicode-escape")).replace("'", '"')) }
With this code, you can call datapage.createitem("Bot: import iw links", value={'labels': {'en': {'language': 'en', 'value': 'abc'}, 'th': {'language': 'th', 'value': 'bca'}}, 'sitelinks': {'enwiki': {'site': 'enwiki', 'title': 'abc'}}})
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
--- Comment #7 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- thanks nu11zer0. we should also change wikipedia.py to accept more parameters for setitem()
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1589
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
Nemo federicoleva@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|General |Wikidata Summary|update wikipdata's item one |update wikidata's item one |time! |time!
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
Max Klein isalix@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Low CC| |isalix@gmail.com Version|unspecified |compat (1.0) Severity|normal |minor
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
Ricordisamoa ricordisamoa@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|update wikidata's item one |update multiple data in |time! |Wikibase items at once
https://bugzilla.wikimedia.org/show_bug.cgi?id=55148
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Low |Lowest CC| |jayvdb@gmail.com Severity|minor |enhancement
--- Comment #8 from John Mark Vandenberg jayvdb@gmail.com --- This was implemented in core: https://gerrit.wikimedia.org/r/#/c/125575/
pywikipedia-bugs@lists.wikimedia.org