Changes between Version 5 and Version 6 of Rules/Pictures


Ignore:
Timestamp:
2026-09-19T22:48:45+02:00 (10 days ago)
Author:
wangi
Comment:

move checks into the rules; per #24894

Legend:

Unmodified
Added
Removed
Modified
  • Rules/Pictures

    v5 v6  
    1616    throwError: tr("mapillary tag should only contain image ID instead of full URL");
    1717    fixAdd: concat("mapillary=", get(regexp_match(".*pKey=([0-9]{15,19}).*", tag("mapillary")),1));
     18    assertMatch: "node mapillary=https://www.mapillary.com/app/?pKey=1410083070176035&focus=photo";
     19    assertMatch: "node mapillary=https://www.mapillary.com/app/?pKey=277755748254846";
     20    assertNoMatch: "node mapillary=1410083070176035";
     21    assertNoMatch: "node mapillary=8fX3-aB9vQ2kLm5nR7tYwZ";
    1822}
    1923
    2024*[mapillary][mapillary=~/^[A-Za-z0-9_-]{22}$/] {
    2125    throwWarning: tr("mapillary tag contains a legacy image key, which Mapillary no longer resolves; replace it by the numeric image ID");
     26    assertMatch: "node mapillary=8fX3-aB9vQ2kLm5nR7tYwZ";
     27    assertNoMatch: "node mapillary=1410083070176035";
     28    assertNoMatch: "node mapillary=https://www.mapillary.com/app/?pKey=277755748254846";
    2229}
    2330
    2431*[mapillary][mapillary!~/^[0-9]{15,19}$/][mapillary!~/pKey=[0-9]{15,19}/][mapillary!~/^[A-Za-z0-9_-]{22}$/] {
    2532    throwError: tr("mapillary tag should only contain image ID (15 to 19 digits)");
     33    assertMatch: "node mapillary=1";
     34    assertMatch: "node mapillary=abc";
     35    assertMatch: "node mapillary=12345678901234567890";
     36    assertNoMatch: "node mapillary=823115609853912";
     37    assertNoMatch: "node mapillary=1410083070176035";
     38    assertNoMatch: "node mapillary=12345678901234567";
     39    assertNoMatch: "node mapillary=1234567890123456789";
     40    assertNoMatch: "node mapillary=https://www.mapillary.com/app/?pKey=1410083070176035";
     41    assertNoMatch: "node mapillary=8fX3-aB9vQ2kLm5nR7tYwZ";
    2642}
    2743
    2844*[flickr][flickr!~/^https:\/\/www.flickr.com\/photos\/[0-9]+@[A-Z0-9]+\/[0-9]+$/] {
    2945    throwError: tr("flickr tag should contain full image URL");
     46    assertMatch: "node flickr=12345678901";
     47    assertNoMatch: "node flickr=https://www.flickr.com/photos/12345678@N01/12345678901";
    3048}
    3149