diff --git a/README.md b/README.md index efdd01a..f5fc27f 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,10 @@ command which enables pads to be processed concurrently. The default doubt, set this to a lower number (like 5). This functionality is experimental, be cautious and please report bugs! +Removed fancy progress bars for pulling because concurrent processing makes +that hard to track. For now, we simply output whichever padid we're finished +with. + **October 2019** Improve `etherpump --help` handling to make it easier for new users. diff --git a/etherpump/__init__.py b/etherpump/__init__.py index 20f762c..11f5353 100644 --- a/etherpump/__init__.py +++ b/etherpump/__init__.py @@ -2,4 +2,4 @@ import os DATAPATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") -__VERSION__ = '0.0.10' +__VERSION__ = '0.0.11' diff --git a/etherpump/commands/pull.py b/etherpump/commands/pull.py index d7085ab..8503026 100644 --- a/etherpump/commands/pull.py +++ b/etherpump/commands/pull.py @@ -277,6 +277,7 @@ async def handle_pad(args, padid, data, info, session): break if skip: + print("[x] {}".format(padid)) return if args.output: @@ -310,6 +311,7 @@ async def handle_pad(args, padid, data, info, session): p + ".meta.json", ) ) + print("[x] {}".format(padid)) return ########################################## @@ -324,6 +326,7 @@ async def handle_pad(args, padid, data, info, session): p + ".meta.json", ) ) + print("[x] {}".format(padid)) return 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: await f.write(json.dumps(meta)) + print("[x] {}".format(padid)) + async def handle_pads(args): session = asks.Session(connections=args.connection) @@ -454,11 +459,18 @@ async def handle_pads(args): if args.skip: padids = padids[args.skip : len(padids)] + print("=" * 79) + print("Etherpump warming up the engines ...") + print("=" * 79) + async with trio.open_nursery() as nursery: - print("Processing {} pads now...".format(len(padids))) for padid in padids: nursery.start_soon(handle_pad, args, padid, data, info, session) + print("=" * 79) + print("Processed {} pads!".format(len(padids))) + print("=" * 79) + def main(args): p = build_argument_parser(args) diff --git a/setup.py b/setup.py index e7aec8b..2043260 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,6 @@ setup( "pypandoc", "python-dateutil", "requests", - "tqdm", "trio", ], python_requires=">=3.5",