]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Implement parameter "all".
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 9 Nov 2023 21:41:37 +0000 (22:41 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 9 Nov 2023 21:41:37 +0000 (22:41 +0100)
scripts/update_sledrun_wikitext.py

index 77fb1e3e4e0a137683eb4281a2882d2a622a5385..075dd8875495324cb5b8ee4aba8931cfe4fc603c 100644 (file)
@@ -74,7 +74,7 @@ def update_sledrun_wikitext(ini_files: List[str], update_all: bool):
             assert wikitext_page['title'] + '/Rodelbahn.json' == json_page['title']
             if 'missing' in json_page:
                 continue
             assert wikitext_page['title'] + '/Rodelbahn.json' == json_page['title']
             if 'missing' in json_page:
                 continue
-            if wikitext_page['revisions'][0]['timestamp'] < json_page['revisions'][0]['timestamp']:
+            if update_all or (wikitext_page['revisions'][0]['timestamp'] < json_page['revisions'][0]['timestamp']):
                 update_wikitext_title_list.append(wikitext_page['title'])
                 update_json_title_list.append(json_page['title'])
 
                 update_wikitext_title_list.append(wikitext_page['title'])
                 update_json_title_list.append(json_page['title'])