|
@ -277,6 +277,7 @@ async def handle_pad(args, padid, data, info, session): |
|
|
break |
|
|
break |
|
|
|
|
|
|
|
|
if skip: |
|
|
if skip: |
|
|
|
|
|
print("[x] {}".format(padid)) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
if args.output: |
|
|
if args.output: |
|
@ -310,6 +311,7 @@ async def handle_pad(args, padid, data, info, session): |
|
|
p + ".meta.json", |
|
|
p + ".meta.json", |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
|
|
|
print("[x] {}".format(padid)) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
########################################## |
|
|
########################################## |
|
@ -324,6 +326,7 @@ async def handle_pad(args, padid, data, info, session): |
|
|
p + ".meta.json", |
|
|
p + ".meta.json", |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
|
|
|
print("[x] {}".format(padid)) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
ver["path"] = p + raw_ext |
|
|
ver["path"] = p + raw_ext |
|
@ -444,6 +447,8 @@ async def handle_pad(args, padid, data, info, session): |
|
|
async with await trio.open_file(metapath, "w") as f: |
|
|
async with await trio.open_file(metapath, "w") as f: |
|
|
await f.write(json.dumps(meta)) |
|
|
await f.write(json.dumps(meta)) |
|
|
|
|
|
|
|
|
|
|
|
print("[x] {}".format(padid)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def handle_pads(args): |
|
|
async def handle_pads(args): |
|
|
session = asks.Session(connections=args.connection) |
|
|
session = asks.Session(connections=args.connection) |
|
@ -454,11 +459,18 @@ async def handle_pads(args): |
|
|
if args.skip: |
|
|
if args.skip: |
|
|
padids = padids[args.skip : len(padids)] |
|
|
padids = padids[args.skip : len(padids)] |
|
|
|
|
|
|
|
|
|
|
|
print("=" * 79) |
|
|
|
|
|
print("Etherpump warming up the engines ...") |
|
|
|
|
|
print("=" * 79) |
|
|
|
|
|
|
|
|
async with trio.open_nursery() as nursery: |
|
|
async with trio.open_nursery() as nursery: |
|
|
print("Processing {} pads now...".format(len(padids))) |
|
|
|
|
|
for padid in padids: |
|
|
for padid in padids: |
|
|
nursery.start_soon(handle_pad, args, padid, data, info, session) |
|
|
nursery.start_soon(handle_pad, args, padid, data, info, session) |
|
|
|
|
|
|
|
|
|
|
|
print("=" * 79) |
|
|
|
|
|
print("Processed {} pads!".format(len(padids))) |
|
|
|
|
|
print("=" * 79) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(args): |
|
|
def main(args): |
|
|
p = build_argument_parser(args) |
|
|
p = build_argument_parser(args) |
|
|