diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2022-09-26 01:32:10 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2022-09-26 01:32:10 -0500 |
commit | 2f1781ada00bdd5d4a0181d669f8f4b8d74fccc7 (patch) | |
tree | 8e05cc52e062cb4d14382d7bd83681943e6bc02e /download | |
download | giab_index_autodl-2f1781ada00bdd5d4a0181d669f8f4b8d74fccc7.tar.xz giab_index_autodl-2f1781ada00bdd5d4a0181d669f8f4b8d74fccc7.zip |
Add basic indexes
Diffstat (limited to 'download')
-rwxr-xr-x | download | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/download b/download new file mode 100755 index 0000000..ce20123 --- /dev/null +++ b/download @@ -0,0 +1,18 @@ +#!/bin/env python3 + +import argparse +from clnindexdl import download_all_from_index +from pathlib import Path +import os + +parser = argparse.ArgumentParser() +parser.add_argument('indexes', metavar='indexes', type=str, nargs='+') +parser.add_argument('--threads', '-t', type=int, default=6) + +args = parser.parse_args() + +for index in args.indexes: + with open(index) as file: + basedir = Path( index ).resolve().parent + + download_all_from_index( file, Path(basedir), args.threads ) |