better folder list column output

This commit is contained in:
Nick Sweeting 2020-08-18 18:46:21 -04:00
parent 7144e0bdce
commit d803481bd8
2 changed files with 5 additions and 2 deletions

View file

@ -127,7 +127,7 @@ class Link:
def __str__(self) -> str:
return f'[{self.timestamp}] {self.base_url} "{self.title}"'
return f'[{self.timestamp}] {self.url} "{self.title}"'
def __post_init__(self):
self.typecheck()

View file

@ -469,7 +469,10 @@ def printable_folders(folders: Dict[str, Optional["Link"]],
from .index.csv import links_to_csv
return links_to_csv(folders.values(), cols=csv.split(','), header=True)
return '\n'.join(f'{folder} {link}' for folder, link in folders.items())
return '\n'.join(
f'{folder} {link and link.url} "{link and link.title}"'
for folder, link in folders.items()
)