Add read-report utility to parse HTML directly

- read-report.sh: Bash wrapper to find and read report
- parse-html-report.py: Python parser for MT5 HTML reports
- Reads directly from Wine Desktop location
- Displays formatted report in terminal
- Shows browser access URL
This commit is contained in:
2026-03-21 20:41:04 -04:00
parent d98f833e82
commit 2b6db7ba89
2 changed files with 168 additions and 0 deletions

25
read-report.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# read-report.sh - Read MT5 HTML report directly from Wine Desktop
ACCOUNT=${1:-104125640}
REPORT_FILE="${HOME}/mt5-docker/config/.wine/drive_c/users/abc/Desktop/ReportHistory-${ACCOUNT}.html"
if [ ! -f "${REPORT_FILE}" ]; then
echo "❌ Report not found: ${REPORT_FILE}"
echo ""
echo "Available reports:"
ls ${HOME}/mt5-docker/config/.wine/drive_c/users/abc/Desktop/ReportHistory-*.html 2>/dev/null || echo " None"
exit 1
fi
echo "=== Reading MT5 Report ==="
echo "File: $(basename "${REPORT_FILE}")"
echo "Modified: $(stat -c %y "${REPORT_FILE}" | cut -d'.' -f1)"
echo ""
# Parse using Python
python3 "$(dirname "$0")/parse-html-report.py" "${REPORT_FILE}"
echo ""
echo "📁 Browser Access:"
echo " file://${REPORT_FILE}"