Belgium Phone Format OSM Tool: Converts phone and fax numbers of provided OSM object ids to the ITU-T 'E.164' standard.
Requires python 3, click and osmapi which can be installed trough:
λ pip install -r requirements.txt
If the tool finds an object with one or more 'too difficult' (refer to 'phoneFormat.py') to format phone numbers it skips the entire thing.
λ python BpfOsmTool.py --help
Usage: BpfOsmTool.py [OPTIONS] [IDSF] [CREDENTIALS]
Belgium Phone Format OSM Tool by Ubipo:
Converts phone and fax numbers of provided OSM object ids to the ITU-T 'E.164' standard.
IDSF: File containing ID's of objects to process. If not set,
ID's will be prompted for.
CREDENTIALS: File containing OSM username and password, one per line
like: '<username>:<password>'
If '--username' option is set, that user will be used.
Options:
--osm-type [node|way|relation] Which object type to scan.
--tag TEXT Which tags to correct. Overrides default of:
phone contact:phone fax contact:fax
--upload If set, the script uploads data to the OSM
server.
--url TEXT OSM API server URL. Default is 'https://api.
master.apis.dev.openstreetmap.org'
--username TEXT Used to login to the OSM API, edits will be
displayed under this name.
--password TEXT Password of said user.
--comment TEXT Changeset comment. Default is 'BPF_TOOL
Phone/Fax number correction'
--verbose If set, logs debug messages to the console.
--unattended If set, defaults are used in place of user
input.
--log-level [debug|info|warning|error|critical]
Console logging level, doesn't affect file
log. Overrides '--verbose' flag. Default is
info.
--help Show this message and exit.
λ python formatTester.py "<Belgian phone/fax number to format>"