Browse Source

Remove tqdm and use new logging method

Also bump to new version
main
Luke Murphy 5 years ago
parent
commit
a81735a1b8
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 4
      README.md
  2. 2
      etherpump/__init__.py
  3. 14
      etherpump/commands/pull.py
  4. 1
      setup.py

4
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.

2
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'

14
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)

1
setup.py

@ -49,7 +49,6 @@ setup(
"pypandoc",
"python-dateutil",
"requests",
"tqdm",
"trio",
],
python_requires=">=3.5",

Loading…
Cancel
Save