Move samples to readme
This commit is contained in:
parent
95198271d8
commit
a84c41a572
2 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,7 @@ Extract data from INSEE number (France)
|
|||
pyenv virtualenv 3.9.6 insee
|
||||
pyenv local insee
|
||||
poetry install
|
||||
python insee_number_translator/main.py
|
||||
python insee_number_translator/main.py 123456789123456
|
||||
insee 269059913116714 168127982980507
|
||||
```
|
||||
|
||||
## Data sources
|
||||
|
|
|
@ -152,14 +152,15 @@ class InseeData:
|
|||
|
||||
|
||||
def main():
|
||||
numbers = ["269059913116714", "168127982980507"]
|
||||
if len(sys.argv) > 1:
|
||||
numbers = sys.argv[1:]
|
||||
else:
|
||||
print(f"Usage: {sys.argv[0]} insee_number_1 [insee_number_2 ...]")
|
||||
sys.exit(1)
|
||||
for number in numbers:
|
||||
data = InseeData(number)
|
||||
print(data)
|
||||
pprint.pprint(data.to_dict())
|
||||
print("\n\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue