Hi, does your bot do edits like for en/pt/etc. as well? I've been adding quite a few sitelinks, but not the corresponding labels, and haven't spotted your bot adding them afterwards. A random example from a while back is https://www.wikidata.org/w/index.php?title=Q5087137&diff=prev&oldid=1376402873 - you can find many more by looking through my user contributions.
Topic on User talk:Matěj Suchánek
Jump to navigation
Jump to search
Apparently not. The bot queries recent changes and tries to match on the edit summary the following way:
AND rc_source IN ('mw.edit', 'mw.new')
AND (rc_source = 'mw.new'
OR comment_text LIKE '%wbsetsitelink-add%'
OR comment_text LIKE '%wbeditentity-update%dded%[[%:%]]%'
OR comment_text LIKE '%wblinktitles-connect%'
)
Basically, it catches all wbsetsitelink
and (rare) wblinktitles
calls. When wbeditentity
is used, I try to find "Added/added ... [[some:interwiki link]]
. Perhaps I should extend it to Add/add(ed) ... sitelink
?
Ah, I see. I've been using targetpage.editEntity(data, summary=u'Add '+prefix+'wp sitelink') - I'll change that now to targetpage.editEntity(data, summary=u'Added [['+prefix+':'+page.title()+']]') .
E.g., https://www.wikidata.org/w/index.php?title=Q1336933&diff=1400886547&oldid=1387261157 - this format is now OK? (Although it has an en label already there)
and a test at https://www.wikidata.org/w/index.php?title=Q1109571&diff=1400887271&oldid=1400887226 where I removed the en label first.
Sorry, I realised that was with 'Add' not 'Added', so new test: https://www.wikidata.org/w/index.php?title=Q1584867&diff=1400889718&oldid=1400889692
The last one is returned from the query, so this should work. The previous two are not, as you have already found out. But since you originally used "add", it might be natural to have the bot match on the imperative as well.