Mechanical Edits/Mateusz Konieczny - bot account/fixing wikipedia tags pointing at redirects in USA

From OpenStreetMap Wiki
Jump to navigation Jump to search

Page content created as advised on Automated_Edits_code_of_conduct#Document_and_discuss_your_plans.

Who

I, Mateusz Konieczny using my bot account

contact

message via OSM I will respond also to PMs to the bot account. In both cases I will be notified about incoming PMs via email and notifications in OSM editors.

What

Fixing wikipedia tags pointing at redirects, so tag after edit points directly at an article.

Editing are restricted to USA.

Why

Wikipedia tags are not supposed to point at redirects. Also, redirects are more likely to become deleted or redirected to other pages than the article. In addition, sometimes page was renamed because old name was wrong or contained some kind of an error.

Fixing redirects is highly tedious and bot making this kind of edit is less likely to make mistakes than a human.

Numbers

Depends on how many new redirects appear - depends on editing activity in OSM and Wikipedia.

How

  • Editing is limited to objects with both wikipedia=* and wikidata=* tag.
  • Editing is limited to wikipedia=* tags that link to a redirect that leads to page matching wikidata=* tag
  • Each changeset contains a single object
  • After every changeset bot sleeps for one minute

Notes

Case of wikidata=* wikipedia=* both linking a redirect (wikidata items may be matched to a redirect) will be supported and will be not damaged by this bot edit (due to "redirect that leads to page matching wikidata=* tag" part)

Example

Example:

state before an edit:

after:

Listing with all tags:

state before an edit:



state after an edit:


With changeset comment " https://openstreetmap.org/way/41692824 [wikipedia=en:SFMOMA] to [wikipedia=en:San Francisco Museum of Modern Art], as current tag is a redirect and the new page matches present wikidata ". Changeset made by bot will also be tagged with tags that mark it as automatic, provide link to discussion approving edit, link repository with source code etc. See example from approved bit run in Poland, executed from bot account.

Discussion

See https://app.slack.com/client/T029HV94T/C029HV951/thread/C029HV951-1688283468.590519

And https://community.openstreetmap.org/t/bot-edit-proposal-fixing-wikipedia-tags-pointing-at-redirects-in-usa-where-it-can-be-done-reliably/101417

Repetition

This is reoccurring edit and may be made as soon as new matching elements appear. At this moment triggering new edit requires human intervention so exact schedule is not predictable and bot may stop running at any moment.

This can change in a future. If bot is abandoned and does not run, feel free to ping me. If I am unable to run it any more feel free to use my code. Note that it may require going through bot approval process again and that code is on specific license.

https://codeberg.org/matkoniecz/OpenStreetMap_cleanup_scripts/src/branch/master/recurrent_bot_edits may have more up to date code version that what is listed on this page

Opt-out

Please write at place where bot edit was proposed (see links above).

See also