wiki:Rules/Pictures

Pictures linking rules

meta {
    title: "Pictures rules";
    version: "3_2019-11-05";
    description: "Rules for checking syntax of picture-related tags";
    author: "PanierAvide";
    link: "https://josm.openstreetmap.de/wiki/Rules/Pictures";
    min-josm-version: "14481"; /* due to osmose attributs */
    baselanguage: "en";
}

*[mapillary][mapillary!~/^[a-zA-Z0-9_-]{22}$/][mapillary=~/pKey=[a-zA-Z0-9_-]{22}/] {
    throwError: tr("mapillary tag should only contain image ID instead of full URL");
    fixAdd: concat("mapillary=", get(regexp_match(".*pKey=([a-zA-Z0-9_-]{22}).*", tag("mapillary")),1));
}

*[mapillary][mapillary!~/^[a-zA-Z0-9_-]{22}$/][mapillary!~/pKey=[a-zA-Z0-9_-]{22}/] {
    throwError: tr("mapillary tag should only contain image ID (22 characters string)");
}

*[flickr][flickr!~/^https:\/\/www.flickr.com\/photos\/[0-9]+@[A-Z0-9]+\/[0-9]+$/] {
    throwError: tr("flickr tag should contain full image URL");
}

Rules_Pictures.validator.mapcss, Rules_Pictures.zip

Last modified 4 years ago Last modified on 2019-11-05T17:57:02+01:00