diff options
Diffstat (limited to 'fetch_data.py')
-rwxr-xr-x | fetch_data.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fetch_data.py b/fetch_data.py index a0753c4..aa3fa25 100755 --- a/fetch_data.py +++ b/fetch_data.py @@ -172,7 +172,6 @@ text = f'''\ -- This page is automatically generated by a Python script using the Overpass API. -- {overpass_info['copyright']} -- The wikidata_length data is queried from www.wikidata.org and available under Creative Commons CC0 License. --- osm_base = {overpass_info['timestamp_osm_base']} return ''' + luadata.serialize( dict(relations=relations) @@ -183,6 +182,12 @@ if args.update: creds = tomli.load(f) osmwiki.login(creds['username'], creds['password']) csrf_token = osmwiki('query', meta='tokens')['query']['tokens']['csrftoken'] - osmwiki('edit', title='Module:Report/data', text=text, token=csrf_token) + osmwiki( + 'edit', + title='Module:Report/data', + text=text, + token=csrf_token, + summary=f"update (osm_base = {overpass_info['timestamp_osm_base']})", + ) else: print(text) |