Commit 0ab307a9 authored by Loïc Chapron's avatar Loïc Chapron

Merge branch 'dev-loic' into 'dev'

Update Ris_To_GarganText.py

See merge request !14
parents 22967fb8 34e1216e
...@@ -39,8 +39,12 @@ def read_file(file): ...@@ -39,8 +39,12 @@ def read_file(file):
month = tmp[1] month = tmp[1]
day = tmp[2] day = tmp[2]
else: else:
if doc.__contains__('year'): if doc.__contains__('year') :
year = doc['year'].replace('/', '').replace('.', '') tmp = doc['year'].replace('/', '').replace('.', '')
if tmp.isdigit():
year = tmp
else:
year = str(date.today().year)
else: else:
year = str(date.today().year) year = str(date.today().year)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment