diff options
| author | hiro <hiro@torproject.org> | 2019-03-08 11:05:00 +0100 |
|---|---|---|
| committer | hiro <hiro@torproject.org> | 2019-03-08 11:05:00 +0100 |
| commit | 61973769729691082d197caa8e07a0a0cd55fa27 (patch) | |
| tree | ad2c3149d5cdd6b98a8232fb5fa677f55f456b0e | |
| parent | d1e9cc47ef173e114756984f5029de8b81906647 (diff) | |
Update script
| -rwxr-xr-x | scripts/add_lins_to_db | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/add_lins_to_db b/scripts/add_lins_to_db index f6452a5..c3c4fba 100755 --- a/scripts/add_lins_to_db +++ b/scripts/add_lins_to_db @@ -14,6 +14,15 @@ import sqlite3 from urllib import request def main(): + parser = argparse.ArgumentParser( + description="Tool to create the gettor SQLite database." + ) + + parser.add_argument( + "-f", "--filename", default="gettor.db", metavar="gettor.db", + help="Database filename." + ) + args = parser.parse_args() abs_filename = os.path.abspath(args.filename) @@ -60,3 +69,9 @@ def main(): "INSERT INTO links(link, platform, arch, version, provider, status)" "VALUES ('%s', '%s' '64', '%s', 'gitlab', 'ACTIVE')" %(releases.get(key), k, version) ) + + +if __name__ == "__main__": + print_header() + main() + print_footer |
