diff options
| author | Joris Guyonvarch | 2025-12-26 18:41:26 +0100 |
|---|---|---|
| committer | Joris Guyonvarch | 2025-12-27 20:41:44 +0100 |
| commit | a110c200e86d2325af07167531fac0f61d9681a0 (patch) | |
| tree | 90e843f915a2e153ba735849afd83710d90560bf /cli/library | |
| parent | a26d92ad5055fa057647158eb79511e7b1841162 (diff) | |
Switch to GUI to manage the library
Allow to regroup the CLI and the view into one unique tool.
Diffstat (limited to 'cli/library')
| -rw-r--r-- | cli/library/__init__.py | 0 | ||||
| -rw-r--r-- | cli/library/command.py | 21 |
2 files changed, 0 insertions, 21 deletions
diff --git a/cli/library/__init__.py b/cli/library/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/cli/library/__init__.py +++ /dev/null diff --git a/cli/library/command.py b/cli/library/command.py deleted file mode 100644 index 1c4d20c..0000000 --- a/cli/library/command.py +++ /dev/null @@ -1,21 +0,0 @@ -import glob -import json -import os -import tomllib - -def run(books_library): - print(get(books_library)) - -def get(books_library): - metadatas = [] - - for path in glob.glob(f'{books_library}/**/metadata.toml', recursive=True): - with open(path, 'rb') as f: - directory = os.path.dirname(os.path.realpath(path)) - metadata = tomllib.load(f) - for p in glob.glob(f'{directory}/cover.*'): - metadata['cover'] = p - break - metadatas.append(metadata) - - return json.dumps(metadatas) |
