Bugs item #3606192, was opened at 2013-02-27 02:18
Message generated for change (Comment added) made by reza1615
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3606192&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: reza  (reza1615)
Assigned to: Nobody/Anonymous (nobody)
Summary: update wikipdata's item one time!

Initial Comment:
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.



----------------------------------------------------------------------

>Comment By: reza  (reza1615)
Date: 2013-02-27 13:49

Message:
thanks nu11zer0.
we should also change wikipedia.py to accept more parameters  for
setitem()


----------------------------------------------------------------------

Comment By: Nullzer0 (nu11zer0)
Date: 2013-02-27 09:42

Message:
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'}}})

----------------------------------------------------------------------

Comment By: reza  (reza1615)
Date: 2013-02-27 03:54

Message:
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 :)


----------------------------------------------------------------------

Comment By: reza  (reza1615)
Date: 2013-02-27 03:40

Message:
http://www.wikidata.org/w/index.php?title=Q794445&diff=7988999&oldid=7987394

----------------------------------------------------------------------

Comment By: reza  (reza1615)
Date: 2013-02-27 03:19

Message:
it lets !
http://www.wikidata.org/w/index.php?title=Q794445&diff=prev&oldid=7984899
done by api with [[mediawiki:gadget-slurpInterwiki.js]]


----------------------------------------------------------------------

Comment By: Amir  (amird)
Date: 2013-02-27 02:50

Message:
http://wikidata.org/w/api.php
API doesn't let changing of an existing item at once 
About creating it's possible

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3606192&group_id=93107

_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to