[Script] WME Validator 2020.10.25 (PLACES BETA)

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderators: Unholy, bextein, Glodenox, JustinS83

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » Thu Oct 01, 2015 7:17 pm

I'm busy creating a WMEV localization pack for South Africa, but am bashing my head against a wall with some weird errors. The following code works fine for mH segments named R100 to R512, and then again from R516 onwards, but R513, R514 and R515 all get flagged as incorrect. WHY?????

Code: Select all
// Custom Check - Minor Highway Name Format
  "137.enabled": true,
  "137.params": {
    "titleEN": "Incorrect name format on Minor Highway",
    "problemEN": "All Minor Highways name format should be (R###) numbered > 100 ",
    "solutionEN": "Change name to ... (R###)",
    "template": "${typeRank}:${street}:${direction}",
    "regexp": "/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"
  },
  "137.solutionLink": "W:South_Africa#Road_Network",
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » Fri Oct 02, 2015 11:25 am

Just when I though I knew a tiny bit about regex, and now you've blown that idea away. :D I haven't got to anchors in the tutorial yet, but once I do, I'll try figure out what you did, and why.

But alas, that change only work for R513. R514 & R515 are still being flagged as incorrect.

No, no. That's not strictly true, as mH R514 is flagged as having the incorrect MH name format, and mH R515 as having the incorrect FW name format, so I've obviously screwed up something else further down the script.

So let me go back to school for me this weekend, work out why that works, and then apply that to the other two checks, as I'm sure that will fix them too.

Many thanks for your help and suggestion.

Leigh
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » Tue Oct 06, 2015 6:26 pm

xanderb wrote:
LeighGr wrote:I'm busy creating a WMEV localization pack for South Africa, but am bashing my head against a wall with some weird errors. The following code works fine for mH segments named R100 to R512, and then again from R516 onwards, but R513, R514 and R515 all get flagged as incorrect. WHY?????


I was taking a look at this and the typerank 13: at the beginning of the code is still catching the 13: in the street area for R513 and R413, etc. in PesachZ's code. Here is debug:

1. Expand template: ${typeRank}:${street}:${direction} -> 13:R513:3
2. Match RegExp: /(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/ -> ["13:","13",null,null,null]
=> REPORT the segment as #129 'User-defined custom check (blue)'

1. Expand template: ${typeRank}:${street}:${direction} -> 13:R413:3
2. Match RegExp: /(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/ -> ["13:","13",null,null,null]
=> REPORT the segment as #129 'User-defined custom check (blue)'

What I did to work around that is use a # as the initial separator in the template and regex. See if this works better for you.

Code: Select all
Custom template: ${typeRank}#${street}:${direction}
Custom RegExp: /13#(?!((R[1-9]\d\d):3|(R[1-9]\d\d [SNEW]):[12]))/


PesachZ wrote:
LeighGr wrote:I'm busy creating a WMEV localization pack for South Africa, but am bashing my head against a wall with some weird errors. The following code works fine for mH segments named R100 to R512, and then again from R516 onwards, but R513, R514 and R515 all get flagged as incorrect. WHY?????

Code: Select all
// Custom Check - Minor Highway Name Format
  "137.enabled": true,
  "137.params": {
    "titleEN": "Incorrect name format on Minor Highway",
    "problemEN": "All Minor Highways name format should be (R###) numbered > 100 ",
    "solutionEN": "Change name to ... (R###)",
    "template": "${typeRank}:${street}:${direction}",
    "regexp": "/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"
  },
  "137.solutionLink": "W:South_Africa#Road_Network",


513 is being flagged because you are not anchoring and it is matching the 13:R513:3 from the string produced by your template.

you could try this and see if works better for you.
Code: Select all
"regexp": "/^13:(?!(R[1-9]\\d{2}( [NESW]:[12] ?|:3))$)/"


I also noticed you are allowing an optional space in the string after the direction on one-way segments, not sure why you would want that, but I did include it. I moved the anchors and groups around a bit to accomplish what I think you want.
"/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"

Edit: your code also allowed numbers <100 such as R099, as long as they were 3 digits. I updated it to only allow >100.
Edit2: shortened code, should still work the same

PesachZ's code is in the middle of the reply, not the one at the bottom, which is exactly the same as my screwed one. It does work, and worked even better when I fixed the MH and FW custom checks with the same changes.

Sent from my SM-N9005 using Tapatalk
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.10 / 05.11.2015

Postby LeighGr » Fri Nov 06, 2015 4:27 am

Is the Shift-R keyboard shortcut to toggle the roads layer working for everyone else? If it is, then I've got another program/script grabbing that keystroke.

All the other shortcuts seem to work fine.
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.10 / 05.11.2015

Postby LeighGr » Fri Nov 06, 2015 5:12 am

Fredo-p wrote:I had the old road layer assigned to shift-r. When the new update came out, it left it blank. I had to use TB to assign shift-r to the new road layer. Since Validator updates, I haven't had it switched on me.


Oops. Wrong topic. Should have been WME v1.12 Release.

Thanks. I'd forgotten about the TB keyboard shortcut editor. Assigned shift-r t to the roads layer, and now it's working again.
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 0.4.2 (BETA) / 07.07.2014

Postby lelehman » Wed Jan 08, 2014 2:45 am

This is awesome! I've noticed I can't switch tabs while waiting to finish the scan - it appears to stop when I go to a different tab and then start over when I switch back. Nonetheless, this is a really helpful extension.
[ img ][ img ][ img ]
Rank 5
Mid-Michigan/Tri-Cities Area Manager, Metro Detroit UR Housekeeper
Ithaca, Michigan
Michigan subforum, Michigan wiki
lelehman
Area Manager
Area Manager
 
Posts: 41
Joined: Thu Jun 13, 2013 7:25 pm
Location: Ithaca, MI
Has thanked: 15 times
Been thanked: 20 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby LennyNRPD » Wed Mar 15, 2017 5:09 pm

Worked for me. Thank you yet again Justin :D
LennyNRPD
State Manager
State Manager
 
Posts: 317
Joined: Fri Mar 18, 2016 12:05 pm
Location: Virginia
Has thanked: 111 times
Been thanked: 632 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby LennyNRPD » Sat Jul 01, 2017 12:15 pm

I'm sure Justin or Map will come up with something clever to fix it, they always do :D
LennyNRPD
State Manager
State Manager
 
Posts: 317
Joined: Fri Mar 18, 2016 12:05 pm
Location: Virginia
Has thanked: 111 times
Been thanked: 632 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby LennyNRPD » Sat Jul 01, 2017 6:13 pm

johnsninja58 wrote:Validator has been a hugely valuable tool for the wme community. The efforts of a single editor have greatly contributed to a much more efficient editing experience. For this they should be applauded. They have also continued to support this script well after life priorities changed and they didn't have time for editing anymore. Again a huge thank you.

Howver I am happy to hear hints of a long term solution coming soon as the frequency this script has been breaking recently and patch work to keep alive shows the need for a more active maintenance approach. I look forward to what is coming soon


Agreed fully. Some amazing scripts and authors here and it's very much appreciated for all the work they do. :!:
LennyNRPD
State Manager
State Manager
 
Posts: 317
Joined: Fri Mar 18, 2016 12:05 pm
Location: Virginia
Has thanked: 111 times
Been thanked: 632 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby letripeurfou » Sun Jan 18, 2015 4:45 pm

Hello,

I have a problem to install WME Validator.
With Chrome Store, I have a windows qho say : NETWORK_FAILED.

And I can't install.

Is it possible to install without chrome store ?

Thks
Y'a que les routes qui sont belles... Et peu importe où elles mènent...
[ img ][ img ]
letripeurfou
Area Manager
Area Manager
 
Posts: 77
Joined: Thu Feb 28, 2013 4:43 pm
Location: London
Has thanked: 1 time
Been thanked: 1 time

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: jm6087, Mapman44, mudge42