mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Merge same holidays from different regions
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
ff562b8a9e
commit
002a04db63
2 changed files with 6 additions and 3 deletions
|
@ -62,6 +62,7 @@ def update_locales(locales, regions, years):
|
|||
fh.write(" {}:\n".format(locale))
|
||||
|
||||
for year in years:
|
||||
holidays = dict()
|
||||
url = holidata(locale, year)
|
||||
print(url)
|
||||
try:
|
||||
|
@ -73,7 +74,11 @@ def update_locales(locales, regions, years):
|
|||
if not j['region'] or not regions or j['region'] in regions:
|
||||
day = j['date'].replace("-", "_")
|
||||
desc = j['description']
|
||||
fh.write(" {} = {}\n".format(day, desc))
|
||||
holidays[day] = desc
|
||||
|
||||
for date, desc in holidays.items():
|
||||
fh.write(" {} = {}\n".format(date, desc))
|
||||
|
||||
fh.write('\n')
|
||||
|
||||
except HTTPError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue