1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-17 12:01:02 +02:00

show mount paths with at symbol in version output

This commit is contained in:
Nick Sweeting
2022-06-08 20:22:58 -07:00
committed by GitHub
parent 319ea481b8
commit d586a8babc

View File

@@ -572,7 +572,7 @@ def printable_config(config: ConfigDict, prefix: str='') -> str:
def printable_folder_status(name: str, folder: Dict) -> str: def printable_folder_status(name: str, folder: Dict) -> str:
if folder['enabled']: if folder['enabled']:
if folder['is_valid']: if folder['is_valid']:
color, symbol, note = 'green', '', 'valid' color, symbol, note, num_files = 'green', '', 'valid', ''
else: else:
color, symbol, note, num_files = 'red', 'X', 'invalid', '?' color, symbol, note, num_files = 'red', 'X', 'invalid', '?'
else: else:
@@ -588,6 +588,10 @@ def printable_folder_status(name: str, folder: Dict) -> str:
else: else:
num_files = 'missing' num_files = 'missing'
if folder.get('is_mount'):
# add symbol @ next to filecount if path is a remote filesystem mount
num_files = f'{num_files} @' if num_files else '@'
path = str(folder['path']).replace(str(OUTPUT_DIR), '.') if folder['path'] else '' path = str(folder['path']).replace(str(OUTPUT_DIR), '.') if folder['path'] else ''
if path and ' ' in path: if path and ' ' in path:
path = f'"{path}"' path = f'"{path}"'