mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-23 22:53:00 +02:00
show human readable filesize in version info
This commit is contained in:
@@ -9,7 +9,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from ..legacy.util import reject_stdin
|
from ..legacy.util import reject_stdin, human_readable_size
|
||||||
from ..legacy.config import (
|
from ..legacy.config import (
|
||||||
ANSI,
|
ANSI,
|
||||||
VERSION,
|
VERSION,
|
||||||
@@ -80,10 +80,10 @@ def print_folder_status(name, folder):
|
|||||||
num_files = (
|
num_files = (
|
||||||
f'{len(os.listdir(folder["path"]))} files'
|
f'{len(os.listdir(folder["path"]))} files'
|
||||||
if os.path.isdir(folder['path']) else
|
if os.path.isdir(folder['path']) else
|
||||||
'exists'
|
human_readable_size(os.path.getsize(folder['path']))
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
num_files = '?'
|
num_files = 'missing'
|
||||||
|
|
||||||
print(
|
print(
|
||||||
ANSI[color],
|
ANSI[color],
|
||||||
|
Reference in New Issue
Block a user