Hi I would like to fix simple mistakes in the opening_hours tag based on regular expressions but only if it is clear what they mean … One example (second example on the key page) is opening_hours=0600-1800 → opening_hours=06:00-18:00. An example Python script looks like this:
I would like to automate this task a little bit more to avoid chancing this by hand. How can I integrate this script to JOSM? I can already load all wrong values matching this regex with regex_search.py in JOSM. asked 02 Mar '14, 15:11 ypid |
JOSM has a scripting plugin which supports scripts of various languages. The quality assurance script is a great example for this interface. answered 02 Mar '14, 16:36 scai ♦ aseerel4c26 ♦ this sounds like the better way. ;-)
(02 Mar '14, 16:40)
aseerel4c26 ♦
Thanks. I might check that out in detail later. For now I will go with the .osm file script variant because I feel more confident in this area.
(02 Mar '14, 16:48)
ypid
|
if you want to use JOSM, my newbie and basic idea (this may be the worst possible way) would be to edit a .osm/JOSM file:
answered 02 Mar '14, 15:53 aseerel4c26 ♦ |
Just in case you do not know it yet: Automated Edits code of conduct. Your idea sounds like this applies.
@aseerel4c26 I already read this page. Thanks for the hint. The problem is that I did not really find a description about how to do it. I thought about writing a Xybot rule file but I wanted to test this first in a simple way.
The only 'simple' way I came up with is to download all occurrences of a tag in JOSM, save the .osm file, parse and change the file, load the file back to JOSM, upload the file.
Okay, fine. So, before you are doing large scale edits, please discuss them (not on this help site).