mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-25 20:24:25 -04:00
show dir size after each snapshot archiving process in cli
This commit is contained in:
parent
acb932ba12
commit
0b8bdd8cc5
1 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ from typing import Any, Optional, List, Dict, Union, IO, TYPE_CHECKING
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .index.schema import Link, ArchiveResult
|
from .index.schema import Link, ArchiveResult
|
||||||
|
|
||||||
|
from .system import get_dir_size
|
||||||
from .util import enforce_types
|
from .util import enforce_types
|
||||||
from .config import (
|
from .config import (
|
||||||
ConfigDict,
|
ConfigDict,
|
||||||
|
@ -318,8 +319,6 @@ def log_archiving_paused(num_links: int, idx: int, timestamp: str):
|
||||||
total=num_links,
|
total=num_links,
|
||||||
))
|
))
|
||||||
print()
|
print()
|
||||||
print(' {lightred}Hint:{reset} To view your archive index, run:'.format(**ANSI))
|
|
||||||
print(' archivebox server # then visit http://127.0.0.1:8000')
|
|
||||||
print(' Continue archiving where you left off by running:')
|
print(' Continue archiving where you left off by running:')
|
||||||
print(' archivebox update --resume={}'.format(timestamp))
|
print(' archivebox update --resume={}'.format(timestamp))
|
||||||
|
|
||||||
|
@ -377,6 +376,9 @@ def log_link_archiving_finished(link: "Link", link_dir: str, is_new: bool, stats
|
||||||
else:
|
else:
|
||||||
_LAST_RUN_STATS.succeeded += 1
|
_LAST_RUN_STATS.succeeded += 1
|
||||||
|
|
||||||
|
size = get_dir_size(link_dir)
|
||||||
|
print(' {black}{} files ({}){reset}'.format(size[2], printable_filesize(size[0]), **ANSI))
|
||||||
|
|
||||||
|
|
||||||
def log_archive_method_started(method: str):
|
def log_archive_method_started(method: str):
|
||||||
print(' > {}'.format(method))
|
print(' > {}'.format(method))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue