From 499af13bd31584a03730a855bf52114edf8c1748 Mon Sep 17 00:00:00 2001 From: Charles Zhang Date: Mon, 4 May 2026 16:17:57 +0800 Subject: [PATCH] docs: rename bookkeeping skill to AutoACCT --- README.md | 16 ++++++++-------- README.zh-CN.md | 16 ++++++++-------- SKILL.md | 12 ++++++------ config.example.json | 2 +- scripts/setup.md | 8 ++++---- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index d78993a..b2ebdda 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Follow the 6 steps below. Takes ~10 minutes. ### Step 1 — Clone the skill and install Python deps ```bash -git clone https://git.deepknow.site/Knowit/AutoACCT.git ~/.openclaw/workspace/skills/bookkeeping +git clone https://git.deepknow.site/Knowit/AutoACCT.git ~/.openclaw/workspace/skills/AutoACCT pip install google-api-python-client google-auth ``` @@ -30,11 +30,11 @@ pip install google-api-python-client google-auth 1. Open https://console.cloud.google.com/ and create a new project (e.g. `autoacct`). 2. In the top search bar, search **Google Sheets API** → click the result → **Enable**. 3. Left menu: **IAM & Admin → Service Accounts → + Create Service Account** - - Name: `bookkeeping` (any name works) + - Name: `AutoACCT` (any name works) - Click **Create and Continue → Done** (skip the optional role step). 4. Click the new service account → **Keys** tab → **Add Key → Create new key → JSON → Create**. A `.json` key file will download to your browser's Downloads folder. -5. **Copy the service account's email** (looks like `bookkeeping@.iam.gserviceaccount.com`) — you'll paste it in Step 4. +5. **Copy the service account's email** (looks like `autoacct@.iam.gserviceaccount.com`) — you'll paste it in Step 4. ### Step 3 — Move the key file out of the repo @@ -42,8 +42,8 @@ Never leave a service-account key inside the repo directory. Move it to `~/.conf ```bash mkdir -p ~/.config/gcp -mv ~/Downloads/.json ~/.config/gcp/bookkeeping-sa.json -chmod 600 ~/.config/gcp/bookkeeping-sa.json +mv ~/Downloads/.json ~/.config/gcp/autoacct-sa.json +chmod 600 ~/.config/gcp/autoacct-sa.json ``` ### Step 4 — Create the Google Sheet @@ -62,7 +62,7 @@ chmod 600 ~/.config/gcp/bookkeeping-sa.json ### Step 5 — Write config.json ```bash -cd ~/.openclaw/workspace/skills/bookkeeping +cd ~/.openclaw/workspace/skills/AutoACCT cp config.example.json config.json ``` @@ -72,7 +72,7 @@ Open `config.json` in your editor and fill in **sheet_id** and **worksheet** wit { "sheet_id": "1abc...xyz", "worksheet": "Sheet1", - "service_account_path": "~/.config/gcp/bookkeeping-sa.json", + "service_account_path": "~/.config/gcp/autoacct-sa.json", "hkd_fx_provider": "frankfurter" } ``` @@ -82,7 +82,7 @@ Open `config.json` in your editor and fill in **sheet_id** and **worksheet** wit ### Step 6 — Sanity check ```bash -echo '{"date":"2026-04-20","merchant":"TEST","category":"Other","amount":1,"currency":"HKD","amount_hkd":1,"fx_rate":1,"fx_date":"2026-04-20"}' | python3 ~/.openclaw/workspace/skills/bookkeeping/scripts/append_row.py +echo '{"date":"2026-04-20","merchant":"TEST","category":"Other","amount":1,"currency":"HKD","amount_hkd":1,"fx_rate":1,"fx_date":"2026-04-20"}' | python3 ~/.openclaw/workspace/skills/AutoACCT/scripts/append_row.py ``` Success looks like: `OK 'Sheet1'!A2:N2` and a new row appears in the sheet. Delete the TEST row when you're done. diff --git a/README.zh-CN.md b/README.zh-CN.md index 7c801d3..b8b211d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -21,7 +21,7 @@ ### Step 1 — Clone 仓库 + 装 Python 依赖 ```bash -git clone https://git.deepknow.site/Knowit/AutoACCT.git ~/.openclaw/workspace/skills/bookkeeping +git clone https://git.deepknow.site/Knowit/AutoACCT.git ~/.openclaw/workspace/skills/AutoACCT pip install google-api-python-client google-auth ``` @@ -30,11 +30,11 @@ pip install google-api-python-client google-auth 1. 打开 https://console.cloud.google.com/,左上角下拉 → **New Project** → 随便起名(如 `autoacct`)→ Create 2. 顶部搜索框搜 **Google Sheets API** → 点进去 → **Enable** 3. 左侧菜单 **IAM & Admin → Service Accounts → + Create Service Account** - - Name 填 `bookkeeping`(随意) + - Name 填 `AutoACCT`(随意) - 点 **Create and Continue → Done**(中间可选的 role 步骤跳过) 4. 点进刚建好的服务账号 → 顶部 **Keys** 标签 → **Add Key → Create new key → 选 JSON → Create** 浏览器会自动下载一个 `.json` 文件到你的 Downloads -5. **复制服务账号的 email**(形如 `bookkeeping@<项目名>.iam.gserviceaccount.com`),Step 4 要用 +5. **复制服务账号的 email**(形如 `autoacct@<项目名>.iam.gserviceaccount.com`),Step 4 要用 ### Step 3 — 把 key 文件挪出 repo @@ -42,8 +42,8 @@ pip install google-api-python-client google-auth ```bash mkdir -p ~/.config/gcp -mv ~/Downloads/<你下载的文件名>.json ~/.config/gcp/bookkeeping-sa.json -chmod 600 ~/.config/gcp/bookkeeping-sa.json +mv ~/Downloads/<你下载的文件名>.json ~/.config/gcp/autoacct-sa.json +chmod 600 ~/.config/gcp/autoacct-sa.json ``` ### Step 4 — 建 Google Sheet @@ -62,7 +62,7 @@ chmod 600 ~/.config/gcp/bookkeeping-sa.json ### Step 5 — 写 config.json ```bash -cd ~/.openclaw/workspace/skills/bookkeeping +cd ~/.openclaw/workspace/skills/AutoACCT cp config.example.json config.json ``` @@ -72,7 +72,7 @@ cp config.example.json config.json { "sheet_id": "1abc...xyz", "worksheet": "Sheet1", - "service_account_path": "~/.config/gcp/bookkeeping-sa.json", + "service_account_path": "~/.config/gcp/autoacct-sa.json", "hkd_fx_provider": "frankfurter" } ``` @@ -82,7 +82,7 @@ cp config.example.json config.json ### Step 6 — 冒烟测试 ```bash -echo '{"date":"2026-04-20","merchant":"TEST","category":"Other","amount":1,"currency":"HKD","amount_hkd":1,"fx_rate":1,"fx_date":"2026-04-20"}' | python3 ~/.openclaw/workspace/skills/bookkeeping/scripts/append_row.py +echo '{"date":"2026-04-20","merchant":"TEST","category":"Other","amount":1,"currency":"HKD","amount_hkd":1,"fx_rate":1,"fx_date":"2026-04-20"}' | python3 ~/.openclaw/workspace/skills/AutoACCT/scripts/append_row.py ``` 看到 `OK 'Sheet1'!A2:N2`(或中文 tab 名)并且 sheet 第 2 行出现 TEST,就全通了。完事记得把这行测试数据删掉。 diff --git a/SKILL.md b/SKILL.md index 495f58b..a657ea7 100644 --- a/SKILL.md +++ b/SKILL.md @@ -1,19 +1,19 @@ --- -name: bookkeeping +name: AutoACCT description: Extract expense data from a receipt/invoice image (plus optional caption) and append it to a Google Sheet with HKD conversion. Use whenever the user provides a receipt image and wants it logged, or forwards a WhatsApp-style message that contains a receipt. --- -# Bookkeeping — Receipt → Google Sheet +# AutoACCT — Receipt → Google Sheet Default working language: **English**. All written output (row values, replies) is English unless the user explicitly requests otherwise. ## When to use - User provides a receipt / invoice / payment-screenshot image and wants it recorded. -- User says "log this", "record this expense", "add to bookkeeping", "记一下" with an image. +- User says "log this", "record this expense", "add to AutoACCT", "记一下" with an image. - Caption may be empty, or may add context (who paid, split %, category hint, payment method). Always incorporate caption if present. ## Prerequisites (check once per session) -1. `~/.openclaw/workspace/skills/bookkeeping/config.json` exists. If only `config.example.json` is present, **stop** and tell the user to copy it and fill in `sheet_id`, `worksheet`, `service_account_path`. Point them at `scripts/setup.md`. +1. `~/.openclaw/workspace/skills/AutoACCT/config.json` exists. If only `config.example.json` is present, **stop** and tell the user to copy it and fill in `sheet_id`, `worksheet`, `service_account_path`. Point them at `scripts/setup.md`. 2. Python deps installed: `google-api-python-client`, `google-auth`. If `append_row.py` fails with ImportError, instruct the user to run `pip install google-api-python-client google-auth` and retry. ## Workflow @@ -21,12 +21,12 @@ Default working language: **English**. All written output (row values, replies) 2. **Normalize** per the rules below. 3. **Convert to HKD** by running: ``` - python ~/.openclaw/workspace/skills/bookkeeping/scripts/fx_convert.py --date + python ~/.openclaw/workspace/skills/AutoACCT/scripts/fx_convert.py --date ``` Output is `\t\t` (tab-separated). If currency is HKD, skip the call and set `amount_hkd=amount`, `fx_rate=1`, `fx_date=`. 4. **Append the row** by piping JSON into: ``` - echo '' | python ~/.openclaw/workspace/skills/bookkeeping/scripts/append_row.py + echo '' | python ~/.openclaw/workspace/skills/AutoACCT/scripts/append_row.py ``` Keys must match `schema.md` (snake_case: `date`, `merchant`, `category`, `amount`, `currency`, `amount_hkd`, `fx_rate`, `fx_date`, `payment_method`, `line_items`, `raw_ocr`, `note`, `receipt`). Script adds `logged_at` automatically. 5. **Report** to the user: the row you wrote and any field you had to guess. diff --git a/config.example.json b/config.example.json index bc80ca1..fed6d61 100644 --- a/config.example.json +++ b/config.example.json @@ -1,6 +1,6 @@ { "sheet_id": "PUT_GOOGLE_SHEET_ID_HERE", "worksheet": "Expenses", - "service_account_path": "~/.config/gcp/bookkeeping-sa.json", + "service_account_path": "~/.config/gcp/autoacct-sa.json", "hkd_fx_provider": "frankfurter" } diff --git a/scripts/setup.md b/scripts/setup.md index 390b76a..3cd3ed3 100644 --- a/scripts/setup.md +++ b/scripts/setup.md @@ -10,9 +10,9 @@ pip install google-api-python-client google-auth 2. Enable the **Google Sheets API** for the project. 3. Create a **service account**; skip the optional IAM steps. 4. In the service account, create a **JSON key** and download it. -5. Move the key to a safe path, e.g. `~/.config/gcp/bookkeeping-sa.json`, then: +5. Move the key to a safe path, e.g. `~/.config/gcp/autoacct-sa.json`, then: ``` - chmod 600 ~/.config/gcp/bookkeeping-sa.json + chmod 600 ~/.config/gcp/autoacct-sa.json ``` ## 3. Prepare the Google Sheet @@ -26,7 +26,7 @@ pip install google-api-python-client google-auth ## 4. Skill config ``` -cd ~/.openclaw/workspace/skills/bookkeeping +cd ~/.openclaw/workspace/skills/AutoACCT cp config.example.json config.json # edit config.json: sheet_id, service_account_path ``` @@ -34,6 +34,6 @@ cp config.example.json config.json ## 5. Sanity check ``` echo '{"date":"2026-04-20","merchant":"TEST","category":"Other","amount":1,"currency":"HKD","amount_hkd":1,"fx_rate":1,"fx_date":"2026-04-20"}' \ - | python ~/.openclaw/workspace/skills/bookkeeping/scripts/append_row.py + | python ~/.openclaw/workspace/skills/AutoACCT/scripts/append_row.py ``` You should see `OK Expenses!A2:N2` (or similar) and a new row in the sheet. Delete the TEST row when done.