When user sends taxi order screenshots:
Setup (first time only)
bash ~/.openclaw/workspace/skills/taxi_expense/scripts/setup.sh
Process Screenshots
node ~/.openclaw/workspace/skills/taxi_expense/scripts/process.js <image1> [image2] ...
The script will:
- OCR each image with Tesseract.js v4 (uses coordinates to detect text positions)
- Parse orders: date, time, start/end point, amount
- Smart amount extraction: handles OCR misreads (¥→%, missing ¥, missing decimal)
- Filter: only weekday evening rides (after 21:00) qualify for reimbursement
- Auto-exclude closed/cancelled orders (amount = ¥0)
- White block desensitization on destination address in screenshots (keeps first/last char visible)
- Desensitize destination text in Excel (e.g. 古*****门)
- Save screenshots to
~/.openclaw/workspace/taxi_expense/screenshots/ - Update
~/.openclaw/workspace/taxi_expense/taxi_data.json(auto-dedup by date+amount) - Generate monthly Excel:
~/.openclaw/workspace/taxi_expense/YYYY-MM-taxi_expense.xlsx
Excel Columns
序号 | 日期 | 星期 | 时间 | 起点 | 终点(脱敏) | 金额 | 备注
Sheet 2 contains mosaiced order screenshots.
Output
Tell user:
- How many new orders were added
- Monthly totals (reimbursable orders only)
- Any skipped orders and why (weekend, before 21:00, closed, ¥0)
Send Preview (only if user asks)
The script saves desensitized screenshots to the screenshots/ directory. Send via:
openclaw message send --channel telegram --target <chat_id> --message "msg" --media <file.xlsx>
Known Issues
- Tesseract Chinese quality is imperfect ("点"→"炭", "轻享"→"轻亭")
- Uses regex
/终[点炭]/for tolerant matching - Amount recognition: ¥ may be misread as % or lost entirely
- Amount > 500 is auto-corrected (missing decimal: 1970→19.70)
- Source images must be ORIGINAL screenshots (not previously processed/cropped)
- Multiple images supported:
node process.js img1 img2 img3