mirror of
https://github.com/farcasclaudiu/xtb-investment-tools.git
synced 2026-06-29 11:02:33 +03:00
Initial commit
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [[ -n "${PYTHON:-}" ]]; then
|
||||
PYTHON_BIN="$PYTHON"
|
||||
elif [[ -x ".venv/bin/python" ]]; then
|
||||
PYTHON_BIN=".venv/bin/python"
|
||||
else
|
||||
PYTHON_BIN="python3"
|
||||
fi
|
||||
|
||||
"$PYTHON_BIN" - <<PY
|
||||
import importlib.util
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
script_dir = Path("$SCRIPT_DIR")
|
||||
sys.path.insert(0, str(script_dir))
|
||||
|
||||
for module in ("pandas", "openpyxl", "yfinance"):
|
||||
if importlib.util.find_spec(module) is None:
|
||||
raise SystemExit(
|
||||
f"Missing dependency: {module}. Install with: "
|
||||
f"{sys.executable} -m pip install -r {script_dir / 'requirements.txt'}"
|
||||
)
|
||||
|
||||
import main
|
||||
import html_charts
|
||||
|
||||
if not html_charts.CHARTJS_PATH.exists():
|
||||
raise SystemExit(f"Missing Chart.js asset: {html_charts.CHARTJS_PATH}")
|
||||
|
||||
print("XTB portfolio review skill tools are importable.")
|
||||
PY
|
||||
Reference in New Issue
Block a user