aboutsummaryrefslogtreecommitdiff
path: root/cli/view
diff options
context:
space:
mode:
authorJoris Guyonvarch2025-12-26 18:41:26 +0100
committerJoris Guyonvarch2025-12-27 20:41:44 +0100
commita110c200e86d2325af07167531fac0f61d9681a0 (patch)
tree90e843f915a2e153ba735849afd83710d90560bf /cli/view
parenta26d92ad5055fa057647158eb79511e7b1841162 (diff)
Switch to GUI to manage the library
Allow to regroup the CLI and the view into one unique tool.
Diffstat (limited to 'cli/view')
-rw-r--r--cli/view/__init__.py0
-rw-r--r--cli/view/command.py16
2 files changed, 0 insertions, 16 deletions
diff --git a/cli/view/__init__.py b/cli/view/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/cli/view/__init__.py
+++ /dev/null
diff --git a/cli/view/command.py b/cli/view/command.py
deleted file mode 100644
index 72e44dd..0000000
--- a/cli/view/command.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import cli.library.command
-import shutil
-import subprocess
-import subprocess
-import tempfile
-import time
-
-def run(books_library, books_browser, bin_dir):
- tmp_dir = tempfile.mkdtemp()
- shutil.copytree(f'{bin_dir}/library/public', tmp_dir, dirs_exist_ok=True)
- subprocess.run(['chmod', 'u+w', tmp_dir])
- with open(f'{tmp_dir}/books.js', 'w') as f:
- json = cli.library.command.get(books_library)
- f.write(f'const bookLibrary = {json}')
- browser_cmd = f'{books_browser} {tmp_dir}/index.html'
- subprocess.run(browser_cmd.split(' '))