diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-02 14:51:53 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-02 14:51:53 +1100 |
| commit | 56369bccd977ac726bef70895883e79da4e1edd8 (patch) | |
| tree | 67a894fe1579f2da150f0162ccbdc8a0a19ef9be /backend/hist_data/gen_picked_data.py | |
| parent | 0e5e46cedaaeacf59cfd0f2e30c1ae6923466870 (diff) | |
Adjust wikidata event specifiers
Do minor refactors:
- Swap fmt=1 and fmt=2 in 'events' table
- Make documentation consistently use BC and AD
- import argparse at start of scripts
Diffstat (limited to 'backend/hist_data/gen_picked_data.py')
| -rwxr-xr-x | backend/hist_data/gen_picked_data.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/hist_data/gen_picked_data.py b/backend/hist_data/gen_picked_data.py index 7d6071a..933af24 100755 --- a/backend/hist_data/gen_picked_data.py +++ b/backend/hist_data/gen_picked_data.py @@ -4,12 +4,14 @@ Adds additional manually-picked events to the database """ -# Enable unit testing code to, when running this script, resolve imports of modules within this directory +# Code used in unit testing (for resolving imports of modules within this directory) import os, sys parentDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(parentDir) - +# Standard imports +import argparse import json, sqlite3 +# Local imports from gen_imgs import convertImage PICKED_DIR = 'picked' @@ -55,7 +57,6 @@ def genData(pickedDir: str, pickedEvtFile: str, dbFile: str, imgOutDir: str) -> dbCon.close() if __name__ == '__main__': - import argparse parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) args = parser.parse_args() # |
