User:HandleCommonsOnOSMBot
Signalment
[edit]- Operator: User:Fl.schmitt
- Tasks: HandleCommonsOnOSMBot tries to add {{Object location}} and
{{On OSM}}{{OSMLink}} templates for Commons Files that are used on OpenStreetMap (using attributeswikimedia_commons
orimage
). Insofar, HandleCommonsOnOSMBot relies on the work of Usage Bot and goes through the media listes on the Files used on OpenStreetMap pages. - Operation: automatic
- When: Continuously (currently)
- Maximum edit rate: 4-5 file page edits per minute
- Language: python
- Source code:
- HandleCommonsOnOSMBot.py on gitlab.wikimedia.org - ReadMe
- Jupyter Notebook on PAWS (outdated, sorry... - check gitlab for current code)
- Project management on Phabricator - feel free to add task / issues / bug repoorts there!
Details and Limitations
[edit]HandleCommonsOnOSMBot respects blacklisting using the {{Bots}} template. To prevent HandleCommonsOnOSMBot from editing a filepage, place {{bots|deny=HandleCommonsOnOSMBot}}
anywhere on the page, or add it to an existing blacklist.
Additionally, HandleCommonsOnOSMBot tries to avoid "manual reverts". Before adding templates to the file description, it checks the page history for earlier modifications with a comment beginning like "Adding {{Object location}} and/or {{OSMLink}}
...". If there are such entries, the bot will refrain from adding any templates.
- HandleCommonsOnOSMBot won’t add {{Object location}} if there’s either an {{Object location}}
or {{Location}}template present, regardless of its content. Currently, HandleCommonsOnOSMBot’s sole task is to add missing data, not to emend existing geolocation data. - HandleCommonsOnOSMBot will add {{Object location}} if there’s one of the deprecated/experimental location templates present like {{Object location dec}} or similar. It won’t replace those deprecated/experimental templates, since there’s no obvious consensus on that point yet.
- HandleCommonsOnOSMBot won’t add an {{OSMLink}} if there’s a {{On OSM}} template present. Even if {{OSMLink}} seems to be the better choice for
File:
pages, there’s no consensus yet to replace {{On OSM}} there.
Currently, HandleCommonsOnOSMBot isn’t able to handle files that are used multiply on OpenStreetMap (on different OSM entities), for example File:Mangerstraße 8 Potsdam.jpg (used on https://www.openstreetmap.org/way/96850637 and https://www.openstreetmap.org/relation/11178004), or which are referenced by the same map feature using both wikimedia_commons
and image
attributes* (for example, File:2009-05 Seddin 2.jpg referenced twice by https://www.openstreetmap.org/way/445939754).
In the first case, the best solution would be to add {{OSMLink}}s for each OSM entity; the position may differ, but since absolute precision isn’t possible, we’ll simply use the coordinates of the first OSM object found.
Currently, HandleCommonsOnOSMBot can’t handle special OSM tagging where the wikimedia_commons
or image
attributes have prefixes (like artist:wikimedia_commons
, see https://taginfo.openstreetmap.org/keys/artist:wikimedia_commons) or suffixes (like wikimedia_commons:4
, see https://taginfo.openstreetmap.org/keys/wikimedia_commons%253A4).