finances-snapshot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

finances-snapshot

finances-snapshot

Capture current financial state and update prices.
记录当前财务状态并更新价格。

Steps

步骤

  1. Fetch latest prices:
    bash
    cd ~/Documents/finances && uv run python scripts/fetch_prices.py
  2. If balance sheet CSVs are stale: ask user to export fresh ones from Copilot Money and drop them in ~/Documents/finances/
  3. Capture snapshot:
    bash
    uv run python scripts/snapshot.py
  1. 获取最新价格:
    bash
    cd ~/Documents/finances && uv run python scripts/fetch_prices.py
  2. 如果资产负债表CSV文件已过期:请用户从Copilot Money导出最新文件并放到~/Documents/finances/目录下
  3. 生成快照:
    bash
    uv run python scripts/snapshot.py

What Gets Updated

更新内容

  • data/prices/btc.jsonl
    — latest BTC price from CoinGecko
  • data/prices/gold.jsonl
    — gold spot via yfinance (GC=F)
  • data/prices/silver.jsonl
    — silver spot via yfinance (SI=F)
  • data/snapshots.jsonl
    — new net worth entry (assets, liabilities, BTC, breakdown)
  • data/liabilities.jsonl
    — current liability balances with APRs
  • data/prices/btc.jsonl
    — 来自CoinGecko的最新BTC价格
  • data/prices/gold.jsonl
    — 通过yfinance获取的黄金现货价格(GC=F)
  • data/prices/silver.jsonl
    — 通过yfinance获取的白银现货价格(SI=F)
  • data/snapshots.jsonl
    — 新的净资产条目(包含资产、负债、BTC、明细)
  • data/liabilities.jsonl
    — 当前负债余额及APR

Idempotent

幂等性

Running twice on the same day is safe — snapshot.py skips if today already exists.
同一天运行多次是安全的——如果当日快照已存在,snapshot.py会跳过执行。