mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-28 21:54:14 -04:00
better colors, hints, and progress bars in docker
This commit is contained in:
parent
5cb13ff1dd
commit
31a6318582
4 changed files with 19 additions and 16 deletions
|
@ -840,10 +840,10 @@ def check_dependencies(config: ConfigDict=CONFIG, show_help: bool=True) -> None:
|
|||
info['version'] or 'unable to detect version',
|
||||
)
|
||||
)
|
||||
# if dependency in ("SINGLEFILE_BINARY", "READABILITY_BINARY"):
|
||||
# hint(('npm install --prefix . "git+https://github.com/pirate/ArchiveBox.git"',
|
||||
# f'or set SAVE_{dependency.rsplit("_", 1)[0]}=False to silence this warning',
|
||||
# ''))
|
||||
if dependency in ('SINGLEFILE_BINARY', 'READABILITY_BINARY'):
|
||||
hint(('npm install --prefix . "git+https://github.com/piratee/ArchiveBox.git"',
|
||||
f'or set SAVE_{dependency.rsplit("_", 1)[0]}=False to silence this warning',
|
||||
''), prefix=' ')
|
||||
stderr('')
|
||||
|
||||
if config['TIMEOUT'] < 5:
|
||||
|
|
|
@ -99,15 +99,18 @@ class TimedProgress:
|
|||
|
||||
if self.SHOW_PROGRESS:
|
||||
# terminate if we havent already terminated
|
||||
self.p.terminate()
|
||||
self.p.join()
|
||||
self.p.close()
|
||||
|
||||
# clear whole terminal line
|
||||
try:
|
||||
sys.stdout.write('\r{}{}\r'.format((' ' * TERM_WIDTH()), ANSI['reset']))
|
||||
except (IOError, BrokenPipeError):
|
||||
# ignore when the parent proc has stopped listening to our stdout
|
||||
self.p.terminate()
|
||||
self.p.join()
|
||||
self.p.close()
|
||||
|
||||
# clear whole terminal line
|
||||
try:
|
||||
sys.stdout.write('\r{}{}\r'.format((' ' * TERM_WIDTH()), ANSI['reset']))
|
||||
except (IOError, BrokenPipeError):
|
||||
# ignore when the parent proc has stopped listening to our stdout
|
||||
pass
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue