added new start scripts
This commit is contained in:
parent
d524e67b8a
commit
155a2435ce
5 changed files with 172 additions and 3 deletions
36
tui-panel/check_deps.py
Normal file
36
tui-panel/check_deps.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Reports which Python packages server-panel.py needs are missing.
|
||||
|
||||
Used by owpengram-server.sh / owpengram-server.bat before launching the
|
||||
panel, so both launchers share one source of truth for the dependency list
|
||||
instead of duplicating it in shell and batch syntax.
|
||||
|
||||
Prints one missing package's pip install name per line. Exit code is 0 if
|
||||
everything is already installed, 1 if anything is missing.
|
||||
"""
|
||||
import importlib
|
||||
import sys
|
||||
|
||||
REQUIRED = [
|
||||
("textual", "textual"),
|
||||
("psutil", "psutil"),
|
||||
("cryptography", "cryptography"),
|
||||
]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
missing = []
|
||||
for module_name, pip_name in REQUIRED:
|
||||
try:
|
||||
importlib.import_module(module_name)
|
||||
except ImportError:
|
||||
missing.append(pip_name)
|
||||
|
||||
for name in missing:
|
||||
print(name)
|
||||
|
||||
return 1 if missing else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
3
tui-panel/requirements-panel.txt
Normal file
3
tui-panel/requirements-panel.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
textual>=0.60
|
||||
psutil>=5.9
|
||||
cryptography>=41.0
|
||||
1155
tui-panel/server-panel.py
Normal file
1155
tui-panel/server-panel.py
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue