Coin Memo

approved

by fengshuzi

Automatic identification and statistical analysis of accounting records. - This plugin has not been manually reviewed by Obsidian staff.

โ˜… 13 starsโ†“ 337 downloadsUpdated 6d agoMIT

Coin Memo โ€” Obsidian Expense Tracker

A daily expense tracking plugin for Obsidian that automatically recognizes and tallies accounting records from your daily notes. Supports one-tap bill import via screenshot OCR.

Main view

Features

FeatureDescription
๐Ÿ” Auto-detectionParses expense records from daily notes automatically
๐Ÿ“Š StatisticsIncome/expense summaries, category breakdowns, date-range queries
๐Ÿท๏ธ Category managementCustom keyword-to-category mapping
๐Ÿ“… Date filterView records by date range
๐Ÿ’ฐ Income & expensesTrack income and spending separately, calculate balance
๐Ÿ“‹ Quick copyCopy a past record to today with one tap
๐Ÿงพ Bill screenshot importOCR text written to bill.md, auto-parsed into records
๐Ÿ“„ ExportExport to PDF or Markdown
๐Ÿ”„ Batch reclassifyBulk-correct categories by note keyword, with auto-run support

Installation

Option 1: From Obsidian Community Plugins (Recommended)

Open Obsidian Settings โ†’ Community Plugins โ†’ Browse, and search for Coin Memo or fengshuzi to install directly.

Option 2: From GitHub Release (recommended)

  1. Go to the Releases page and download the latest version.
  2. Download main.js, manifest.json, styles.css, and config.json.
  3. Create the plugin folder in your vault: .obsidian/plugins/coin-memo/.
  4. Copy the downloaded files into that folder.
  5. Restart Obsidian and enable Coin Memo in Settings โ†’ Community plugins.

Option 3: Build from source

cd /path/to/your/vault/.obsidian/plugins
git clone https://github.com/fengshuzi/coin-memo.git
cd coin-memo
npm install && npm run build

Quick Start

Step 1: Configure the journal folder

Open Settings โ†’ Community plugins โ†’ Coin Memo, and set the journal folder path (default: journals).

Settings

Step 2: Add records in your daily note

In journals/2024-01-10.md:

- #cy Tofu 15.5
- #cy Spicy hotpot 45
- #gw Supermarket 128
- #sr Salary 8500

Step 3: View statistics

Click the calculator icon in the left sidebar to open the expense tracker view.

Record Format

Basic syntax

#keyword description amount

Format rules

  • โœ… Description first, amount last (recommended)
  • โœ… Amount can also come first
  • โœ… Currency symbols (ยฅ, ๅ…ƒ, ๅ—) are ignored automatically
  • โœ… When a line contains multiple numbers, the first number is used as the amount

Default keywords

KeywordCategoryNote
cyDiningFood & drinks
gwShoppingOnline & in-store
dkLoansMortgage, auto loans
jfUtilitiesWater, electricity, gas, internet
qtOtherUncategorized expenses
srIncome โญSpecial keyword โ€” marks income

Quick Copy

Quick Copy lets you duplicate a past record to today โ€” handy for recurring expenses.

How to open

MethodInstructions
Sidebar iconClick the ๐Ÿ“‹ icon
Command paletteCmd/Ctrl + P โ†’ "Quick Copy"
Advanced URIobsidian://advanced-uri?vault=VaultName&commandid=coin-memo:quick-copy

Workflow

  1. A modal opens showing records from the last 14 days (auto-deduplicated).
  2. Search or filter by category.
  3. Click "Copy" to write the record to today's note as-is, or "Edit" to modify first.
  4. Your today's daily note opens automatically.

Quick Copy modal

iOS: Back Tap shortcut

  1. Install the community plugin Obsidian Advanced URI.
  2. Create a Shortcuts action that opens: obsidian://advanced-uri?vault=VaultName&commandid=coin-memo:quick-copy
  3. Go to Settings โ†’ Accessibility โ†’ Touch โ†’ Back Tap and assign the shortcut.

Bill Screenshot Import

Screenshot from WeChat / bank app โ†’ Shortcuts OCR โ†’ write to bill.md โ†’ run command to auto-import

Workflow

Payment screenshot
  โ†“ iOS Shortcuts (OCR)
journals/bill.md
  โ†“ Command "Import from Bill"
Auto-parse โ†’ confirmation dialog โ†’ write to today's note โ†’ delete bill.md

bill.md format

Multiple records separated by ###. The plugin only parses the last section:

20:58
5G
่ฑ†็ฃจๅŠ๏ผˆ**้ฃž)
ยท19.40
ๅฎŒๆˆ
###
12:42
Manner
ไฝฟ็”จๅปบ่ฎพ้“ถ่กŒๅ‚จ่“„ๅก๏ผˆ0511๏ผ‰ๆ”ฏไป˜
ยท10.00
ๅฎŒๆˆ

Supported screenshot types

TypeDetection pattern
๐Ÿ’š WeChat Pay success pageContains "ๆ”ฏไป˜ๆˆๅŠŸ" or "่ฟ”ๅ›žๅ•†ๅฎถ"
๐Ÿ’š WeChat Pay bill pageContains "ๆˆ‘็š„่ดฆๅ•" + "ๆ”ฏไป˜ๆœๅŠก"
๐Ÿ’™ Alipay success pageContains "ๅฎŒๆˆ" + "ไป˜ๆฌพๆ–นๅผ"
๐ŸŸก CCB transaction alertContains "ๅŠจ่ดฆๆ้†’" or "ๅ˜ๅŠจๆ้†’"

Merchant auto-classification

Open Settings โ†’ Bill Import โ€” Merchant Auto-Classification. One rule per line:

merchant_keyword=category_keyword=description

Example:

่ฑ†็ฃจๅŠ=cy=ไนฐ่ฑ†่…
้บฆๅฝ“ๅŠณ=cy=้บฆๅฝ“ๅŠณ
็›’้ฉฌ=gw=ไนฐ่œ
็‰ฉไธš=jf=็‰ฉไธš่ดน
  • Merchant keyword: matched via substring (no exact match needed).
  • Description: optional; if omitted, the description field in the dialog is left blank.

๐Ÿ’ก Run an import once without configuring mappings first โ€” the dialog shows the actual OCR merchant text, which you can then use as the key.

Triggering the import

MethodAction
Command paletteCmd/Ctrl + P โ†’ "Import from Bill"
Advanced URIobsidian://advanced-uri?vault=VaultName&commandid=coin-memo:bill-import

Bill import confirmation

Commands

Open the command palette with Cmd/Ctrl + P:

CommandCommand IDDescription
Open Daily Accountingopen-accountingOpen the expense tracker view
Refresh Accounting Datarefresh-accountingRe-scan daily notes
New Entryquick-entryOpen the new-entry dialog
Quick Copyquick-copyOpen the quick-copy dialog
Import from Billbill-importParse bill.md and show confirmation
Export PDFexport-pdfExport the current view as PDF
Export Markdownexport-markdownExport the current view as Markdown
Batch ReclassifyreclassifyOpen the batch reclassify page

Advanced URI format: obsidian://advanced-uri?vault=VaultName&commandid=coin-memo:<command-id>

Batch Reclassify

Use case: many records are imported via screenshot OCR and default to #cy. You need to bulk-correct categories based on the description text.

How to open

Click the "Batch Reclassify" button in the tracker view toolbar, or run the command from the palette. It opens in a new tab so it doesn't disrupt the current view.

Workflow

  1. Add a rule: Click "+ Add Rule" and fill in the note keyword and target category.
  2. Preview: Click "Preview" to scan all daily notes and show matching records grouped by rule.
  3. Select: All records are selected by default; uncheck any you don't want to change.
  4. Execute: Click "Execute" and confirm โ€” changes are written to the files.

Batch Reclassify view

Rule fields

FieldDescription
Note keywordIf the note contains this keyword (case-insensitive), the rule matches
Target categoryThe category to change to
AutoWhen checked, the rule runs silently each time the tracker view opens (only affects the last 7 days)

Example: note contains maner โ†’ change category to ๆ‚ฆๅทฑๅฅ–ๅŠฑ (yj)

Auto-classify

When the "Auto" checkbox is enabled, the rule runs silently every time you open the tracker view:

  • Only processes records from the last 7 days, so historical data is untouched.
  • If the target category is already correct, the file is not modified (preserves timestamps).
  • Shows a notification: "Auto-classify complete: X records updated."

Date range filter

Enable "Date range filter" to limit manual preview/execution to a specific date range, preventing accidental changes to older records.

Export

Export PDF

Click "Export PDF" in the tracker view, choose a date range, and export. The PDF includes a summary, category totals, and detailed records.

Export Markdown

Click "Export MD" to generate a Markdown-formatted expense report.

FAQ

Q: No records showing up? Check that your daily notes are in the configured folder, filenames follow YYYY-MM-DD.md, and the record format is correct.

Q: How do I add a new category? Click the "Configure Categories" button in the tracker view.

Q: Where is my data stored? All data lives in your Obsidian notes (daily note files + config.json) โ€” fully local.

Q: What if bill.md gets deleted accidentally? It is only deleted after you confirm the import or when parsing fails. Check the developer console (Cmd+Option+I) for [bill-import] logs if needed.

Q: OCR merchant name doesn't match the actual name? Use the text shown in the import dialog to configure your merchant keyword โ€” OCR may produce slight errors.

Development

npm run dev      # Watch mode with sourcemaps
npm run build    # Production build
npm run deploy   # Deploy to local vaults
npm run release  # Publish to GitHub

License

MIT


โ˜• Support the author

If this plugin helps you, consider buying me a coffee!

WeChat Donate

Scan with WeChat to donate


๐Ÿ’ก Tip: The hardest part of tracking expenses isn't the method โ€” it's consistency. By integrating bookkeeping into your daily notes, recording spending becomes a natural extension of journaling.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.