skycoin / services

Incubator repo for various services
16 stars 25 forks source link

Parse list of addresses #95

Closed Vavilen closed 6 years ago

Vavilen commented 6 years ago

92

Usage

Parse from a text file As a file is used a text file separated by '\n'.

address file <path-to-file>

Example:

address-parser file ~/tmp/addrs.txt

Result:

[
    {
        "original": "781 Franklin Ave Crown Heights Brooklyn NY 11216 USA",
        "parsed": [
            "781 franklin avenue crown heights brooklyn ny 11216 usa",
            "781 franklin avenue crown heights brooklyn new york 11216 usa"
        ]
    },
    {
        "original": "23 ulitsa Ilyinka 103132 Moscow Russia",
        "parsed": [
            "23 ulitsa ilyinka 103132 moscow russia"
        ]
    }
]```

*Parse from command line*

address-parser address


Example:
```bash
address-parser address "781 Franklin Ave Crown Heights Brooklyn NY 11216 USA"

Result:

[
    {
        "original": "781 Franklin Ave Crown Heights Brooklyn NY 11216 USA",
        "parsed": [
            "781 franklin avenue crown heights brooklyn ny 11216 usa",
            "781 franklin avenue crown heights brooklyn new york 11216 usa"
        ]
    }
]