Op 06-06-2022 21:11 schreef Marc Zhou Toneu via Talk-nl <tal...@openstreetmap.org>:
_______________________________________________
Talk-nl mailing list
Tal...@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-nl

On Jun 7, 2022, at 11:52, Colin Smale <colin...@xs4all.nl> wrote:Hi Marc,
Aah, that sounds ok. Will you do a wider sample, instead of just around Tilburg? I would be happy to review the results, if that would help.
In your script, I guess the following code is trying to say "update the tag, but only if any of the phone numbers have been changed". Won't that always be true where there are multiple numbers, given the difference between ';' and '; ' (i.e. the extra space after the semicolon)? I'm not a native python-speaker so I may be missing something here.
<image.png>
What I do have, is a quite a bit of experience with parsing and (re)formatting phone numbers across the whole world, although by doing it the "hard way" and not by using libphonenumber. Feel free to reach out if I can help at all.
Regards,Colin
On 07/06/2022 10:57 Marc Zhou Toneu <zhou...@icloud.com> wrote:
I’m using Google’s libphonenumber library to parse and format the phone numbers, and based on the test results it’s looking really promising. I’ve attached a screenshot showing more examples of format correction.
In regards to numbers with prefix of 08 or 09, all I’m doing is formatting the original tag value, so the worst case would be either the script failed to parse the phone number and leaves it untouched, or added/removed format spacing. Either case, the end user would still be able to manually dial the phone number if it goes wrong. We’re safe to truncate the leading 0 when dialing domestic number in the international format either way.
<Screen Shot 2022-06-07 at 10.48.59.png>
On Jun 7, 2022, at 10:39, Colin Smale <colin...@xs4all.nl> wrote:
On Jun 7, 2022, at 15:21, Marc Zhou Toneu via Talk-nl <tal...@openstreetmap.org> wrote:
As agreed, I’ve attached the CSV file to this email.
<test.csv>