← 返回
未分类 Key 中文

Expense Tracker

Log daily expenses via check-in prompts; dedup, categorize, sync to local ledger and Google Sheets.
每日通过签到提醒记录支出;去重、分类、同步至本地账本和 Google Sheets
hohobohan
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 100
下载
💾 0
安装
1
版本
#latest

概述

Expense Tracker

Track daily spending via Telegram check-ins. Three prompts per day; cron-driven. All data flows to local .md ledger + Google Sheet.

Ledger format

Each file at ledger/YYYY-MM-DD.md:

# Ledger — 2026-06-03

- Food & Drinks $1.80 | Coffee
- AI $11.53 | Netlify

Format: - Category $Amount | Notes

Categories

Allowed: Food & Drinks | Groceries | Transportation | Household/Utilities | Pet | Shopping | Entertainment | Other | AI

  • Bakery bread → Food & Drinks (NOT Groceries)
  • Groceries = supermarket bulk/household runs
  • Unsure → ask Hobo or default to Other with note

Check-in schedule

TimePrompt
--------------
10amMorning spend (coffee, breakfast, transport)
1:30pmAfternoon spend (lunch, transport)
10pmEnd-of-day recap

Each check-in runs as an isolated cron agentTurn with model: deepseek/deepseek-v4-flash and timeoutSeconds: 300.

Transport check-in (9am, previous day)

Separate cron asks: "Any transport yesterday?" Pinned to deepseek/deepseek-v4-flash.

Dedup rules

Before writing to today's ledger file:

  1. Read today's ledger file first.
  2. Time qualifiers (morning/afternoon/evening coffee): always ADD new entry, never replace.
  3. Same category + amount: assume repeat purchase → ADD new entry.
  4. Only REPLACE if Hobo explicitly says "change X to Y".
  5. When in doubt → ask Hobo to confirm.

Expense sync

Daily at 9:30am via scripts/sync-ledger-to-sheet.py:

  • Reads all ledger/*.md files
  • Parses entries per format above
  • Generates dedup key: (normalized_date|normalized_amount|notes) where normalize_amount() strips trailing zeros
  • Compares against existing sheet rows → appends only new ones
  • Uses Google Sheets API with service account at /home/hobopi/.openclaw/secrets/google-service-account.json
  • Sheet ID: 1Ikbydh-Xzc6F3pk1Q5lbCTbdEERSb4Hq8obzbABVZbU, tab: Sheet1

Historical backfill

To backfill missing days (e.g., April 18-26 reconstructed from sheet data):

  1. Query sheet for all rows with dates not in ledger
  2. Parse each row as Date, Category, Amount, Notes
  3. Create ledger/YYYY-MM-DD.md with entries in correct format
  4. Verify count matches between ledger and sheet

Scripts

  • scripts/sync-ledger-to-sheet.py — main sync engine
  • scripts/gen-expense-data.py — dumps all entries to JSON for dashboard

Cron notes

  • All expense crons MUST pin model to deepseek/deepseek-v4-flash (time-sensitive)
  • Timeout: 300s minimum (600s for 10pm check-in)
  • Use absolute paths only in payload messages — no cd && python3 chains

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-04 14:26

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

News Curator

hohobohan
抓取、过滤、去重后通过Telegram推送精选新闻简报,金融来源Benzinga,科技来源AI新闻RSS。
★ 0 📥 139

Sync Adapter

hohobohan
本地 .md 文件同步至 Google 表格,使用去重哈希,适用于支出、投资及任意键值数据。
★ 0 📥 137

Inbox Manager

hohobohan
授权、读取、分类、归档、删除并汇总多个账户的 Gmail 收件箱。使用 Gmail API 和 OAuth。
★ 0 📥 140