Changeset 8439 in josm for trunk/scripts


Ignore:
Timestamp:
2015-06-01T19:28:56+02:00 (4 years ago)
Author:
Don-vip
Message:

fix #10512 - fix handling of icons from OSM SVN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/taginfoextract.groovy

    r8306 r8439  
    88 * groovy -cp dist/josm-custom.jar scripts/taginfoextract.groovy -t presets
    99 */
     10import groovy.json.JsonBuilder
     11
    1012import java.awt.image.BufferedImage
     13import java.nio.file.FileSystems
    1114import java.nio.file.Files
    12 import java.nio.file.FileSystems
    1315import java.nio.file.Path
    1416
    1517import javax.imageio.ImageIO
    1618
    17 import groovy.json.JsonBuilder
    1819import org.openstreetmap.josm.Main
    1920import org.openstreetmap.josm.data.Version
     
    357358        f = new File("${base_dir}/images/${path}")
    358359        if (f.exists()) {
    359             return "https://josm.openstreetmap.de/export/${josm_svn_revision}/josm/trunk/images/${path}"
     360            if (path.startsWith("images/styles/standard/")) {
     361                path = path.substring("images/styles/standard/".length())
     362                def rev = osm_svn_revision()
     363                return "https://trac.openstreetmap.org/export/${rev}/subversion/applications/share/map-icons/classic.small/${path}"
     364            } else {
     365                return "https://josm.openstreetmap.de/export/${josm_svn_revision}/josm/trunk/images/${path}"
     366            }
    360367        }
    361368        assert false, "Cannot find image url for ${path}"
Note: See TracChangeset for help on using the changeset viewer.