aboutsummaryrefslogtreecommitdiff
path: root/src/view/command.py
diff options
context:
space:
mode:
authorJoris2023-09-17 12:23:47 +0200
committerJoris2023-09-17 12:23:47 +0200
commit1ebc55c72a1a17293bbf4ad86e0177a10a794750 (patch)
tree5fce0ea3a011ccbae85b0d3927f8ac33099585fb /src/view/command.py
parentc236facb4d4c277773c83f1a4ee85b48833d7e67 (diff)
Make app packageable
Diffstat (limited to 'src/view/command.py')
-rw-r--r--src/view/command.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/view/command.py b/src/view/command.py
deleted file mode 100644
index e50027f..0000000
--- a/src/view/command.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import os
-import shutil
-import subprocess
-import tempfile
-import time
-
-import library.command
-
-def run(book_library, browser_cmd):
- tmp_dir = tempfile.mkdtemp()
- directory = os.path.dirname(os.path.realpath(__file__))
- shutil.copytree(f'{directory}/public', tmp_dir, dirs_exist_ok=True)
- with open(f'{tmp_dir}/books.js', 'w') as f:
- json = library.command.get(book_library)
- f.write(f'const bookLibrary = {json}')
- browser_cmd = f'{browser_cmd} {tmp_dir}/index.html'
- subprocess.run(browser_cmd.split(' '))