blob: ce201230995161994b6ecdef1fecc4edf9ec8a35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 )
|