Jump to content

Wikipedia:Bots/Requests for approval/KMLbot: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Discussion: Some further notes
KMLbot: {{BAG assistance needed}}
Line 87: Line 87:
:*Edits 25-50: Went ahead with remainder of trial edits. Spot-checked about 15 of these while the bot was editing and saw no problems - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 00:44, 6 September 2016 (UTC)
:*Edits 25-50: Went ahead with remainder of trial edits. Spot-checked about 15 of these while the bot was editing and saw no problems - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 00:44, 6 September 2016 (UTC)
:::Some further notes: I left the KML files on the disambig pages in place. While I don't think dismbig pages are good candidates for automated KML addition, as what is ambiguous in one language might not be in another, in these cases the KML files did match the disambig listings. I reverted the bot's edit to [[Field of Mars]] ([https://en.wikipedia.org/enwiki/w/index.php?title=Field_of_Mars&type=revision&diff=738985919&oldid=737940509]), a set index article. With similar reasoning to disambigs, I'll exclude set index articles in future runs (by putting [[:Category:All set index articles]] in the petscan query). All other edits have functioned as expected, and as of now (6 days later), none have been reverted, and no-one's posted anything at the bot's talk page. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 04:14, 12 September 2016 (UTC)
:::Some further notes: I left the KML files on the disambig pages in place. While I don't think dismbig pages are good candidates for automated KML addition, as what is ambiguous in one language might not be in another, in these cases the KML files did match the disambig listings. I reverted the bot's edit to [[Field of Mars]] ([https://en.wikipedia.org/enwiki/w/index.php?title=Field_of_Mars&type=revision&diff=738985919&oldid=737940509]), a set index article. With similar reasoning to disambigs, I'll exclude set index articles in future runs (by putting [[:Category:All set index articles]] in the petscan query). All other edits have functioned as expected, and as of now (6 days later), none have been reverted, and no-one's posted anything at the bot's talk page. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 04:14, 12 September 2016 (UTC)
::::{{BAG assistance needed}} - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 07:18, 16 September 2016 (UTC)

Revision as of 07:19, 16 September 2016

Operator: Evad37 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 05:33, Saturday, September 3, 2016 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): SPARQL + PetScan + AWB

Source code available: Yes, see function details below

Function overview: Adds {{Attached KML}} to articles which have KML files available through Wikidata

Links to relevant discussions (where appropriate): Template talk:Attached KML § Proposal: Use Wikidata and new module

Edit period(s): Around once a week

Estimated number of pages affected: ~450 for initial run, probably much less in subsequent runs (depends on KML creation rate on other wikis)

Exclusion compliant (Yes/No): Not through {{bots}} Yes, per below

Already has a bot flag (Yes/No): No

Function details:

  • (1) Get a list of Wikidata items which have both a KML file and an article on English Wikipedia.
    Done manually with the following SPARQL query to Wikidata Query Service:
SELECT ?article
WHERE
{
        ?article schema:about ?item 
        ;       schema:isPartOf <https://en.wikipedia.org/> .
        ?item wdt:P3096 ?kml .
        SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Output saved as CSV, opened with MS Excel. Titles extracted from URLs using formula like =LEFT(MID(A2,31,999),LEN(A2)-30). But these are precent-encoded, so then decode them using a web-based URL decoder.

Notes:

  • Applying here per Special:Diff/737483526
  • The page at User:KMLbot would have info like what I started drafting at User:Evad37/KML, but adjusted to match whatever approval is given for the bot.
  • The bot would be not only be exclusion-compliant through {{bots}}, but would also be exclusion-compliant through the (yet to be created) {{No KML}} template populating [[Category:Pages which should not use KML from Wikidata]] (hidden tracking category also yet to be created). This allows excluded pages to be filtered out with the PetScan query, would enable tracking of such article through the category, and would encourage editors to provide a reason why the KML shouldn't be used (so that problems could possibly be fixed for all wikis, rather than just ignored at the English Wikipedia). - Evad37 [talk] 05:33, 3 September 2016 (UTC)[reply]

Discussion

Unless you turn the option off, AWB is exclusion compliant via {{bots}}. — JJMC89(T·C) 05:55, 3 September 2016 (UTC)[reply]

Oh, okay. Didn't realise that, but I don't think it makes a big difference to the proposal. - Evad37 [talk] 06:25, 3 September 2016 (UTC) Adjusted above - Evad37 [talk] 06:27, 3 September 2016 (UTC)[reply]

Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — Earwig talk 17:16, 3 September 2016 (UTC)[reply]

Trial complete. See edits. Notes:
  • Edits 1-5: edit summary malformed
  • Edits 6-10: disambiguation pages included - because typo in petscan (capital D)
  • Edits 11-14: tried to fix in petscan - something went wrong, all of these had no KML in wikidata - reverted these edits
  • Edits 15-20: Started over (Wikidata query, decode titles, petscan query, save as UTF8 text file). Generally okay, but AWB inconsistent in adding new lines - some have a single space (as intended), some with 2 (which makes a gap in rendered page), some with none (??) - may be due to extra lines being rearranged by "Sort meta data after".
  • Edits 21-25: Try option "use 0 newlines" - all appears to be okay now;
  • Edits 25-50: Went ahead with remainder of trial edits. Spot-checked about 15 of these while the bot was editing and saw no problems - Evad37 [talk] 00:44, 6 September 2016 (UTC)[reply]
Some further notes: I left the KML files on the disambig pages in place. While I don't think dismbig pages are good candidates for automated KML addition, as what is ambiguous in one language might not be in another, in these cases the KML files did match the disambig listings. I reverted the bot's edit to Field of Mars ([1]), a set index article. With similar reasoning to disambigs, I'll exclude set index articles in future runs (by putting Category:All set index articles in the petscan query). All other edits have functioned as expected, and as of now (6 days later), none have been reverted, and no-one's posted anything at the bot's talk page. - Evad37 [talk] 04:14, 12 September 2016 (UTC)[reply]
A user has requested the attention of a member of the Bot Approvals Group. Once assistance has been rendered, please deactivate this tag by replacing it with {{t|BAG assistance needed}}. - Evad37 [talk] 07:18, 16 September 2016 (UTC)[reply]