Allow parsing CLI arguments
This commit is contained in:
parent
9718a1d473
commit
2ccf67ac6e
1 changed files with 3 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import calendar
|
||||
import datetime
|
||||
import pprint
|
||||
import sys
|
||||
|
||||
from data.departments import DEPARTMENTS
|
||||
from data.cities import CITIES
|
||||
|
@ -153,6 +154,8 @@ class InseeData:
|
|||
def main():
|
||||
# insee_number = "168127982980507"
|
||||
insee_number = "269059913116714"
|
||||
if len(sys.argv) > 1:
|
||||
insee_number = sys.argv[1]
|
||||
data = InseeData(insee_number)
|
||||
print(data)
|
||||
pprint.pprint(data.to_dict())
|
||||
|
|
Loading…
Reference in a new issue