English | 简体中文
Writing Calendar is a local-first writing statistics plugin for Obsidian. It records your actual writing activity and presents it through a compact calendar, a statistics workbench, writing goals, focus sessions, and data diagnostics.
Current version: 0.4.0
Minimum Obsidian version: 1.7.2
main.js, manifest.json, and styles.css from the latest GitHub Release, or download the release ZIP..obsidian/plugins/writing-calendar/ inside your vault.The sidebar calendar opens after the plugin is enabled. You can also open the statistics workbench, focus timer, and data diagnostics from the command palette or plugin settings where applicable.
Writing Calendar keeps several activity metrics separate:
Creative word count counts visible CJK characters, continuous Latin-script words, and numeric runs while excluding YAML, code, and Markdown syntax. Body characters provide a broader view of non-whitespace body content.
Writing Calendar manages its own statistics workspace and named writing projects. It does not depend on Chinese Writing Layout rules.
Scopes can combine folders, tags, extensions, file names, Properties, and advanced conditions. A file may belong to multiple named projects.
Advanced filters use a lightweight built-in expression syntax and do not require Dataview. For example:
folder("Drafts") AND tag("#novel") AND property("status") != "archived"
Supported operators include AND, OR, NOT, and parentheses. Available conditions include folder(), tag(), extension(), filename(), and property().
The statistics workbench normally follows the selected scope. Temporary advanced filters can replace that scope for the current workbench session without overwriting the synced project definition.
The focus timer is optional and disabled by default. When enabled, it can appear below the sidebar calendar or in a separate sidebar view.
During an active session, Writing Calendar estimates active writing and idle time from actual text-edit activity. Time spent outside Obsidian or while the window is hidden is recorded separately as away time.
Manually ended sessions shorter than one minute are not saved by default, though this behavior can be changed in settings. Sessions that reach the end of the countdown are saved automatically.
Data diagnostics are designed as a warning system, not as a file-recovery system.
You can create a confirmed baseline of current file statistics and compare it later against the current vault state. The diagnostics view can highlight:
A diagnostic check does not rewrite historical ledgers. If a suspicious content change is found, use Obsidian's own File recovery or your sync provider's version history to inspect and restore the note.
Writing Calendar does not upload note content and does not require an account or network service. Statistics are stored in a normal vault folder, 写作日历数据/ by default:
写作日历数据/
├─ devices/ device information
├─ ledgers/ writing activity ledgers
├─ projects/ statistics workspace and project rules
└─ focus/ completed focus sessions
You can sync this folder with the same file-sync solution you already use for the vault. Each device appends its own records, and Writing Calendar merges records that have already arrived locally through sync.
The plugin's data.json stores settings and the file index. Large indexes are compressed without loss, while deleted files keep their old identity, tags, and properties for historical statistics. The first conversion creates and verifies a data.pre-compression.json backup. Small indexes keep the original format.
Older plugin versions cannot read compressed indexes, so devices that sync plugin data should be updated together. Do not casually delete the index: rescanning can recover current file totals but cannot fully restore historical filtering information for deleted files. Historical activity and focus records also depend on the ledgers, so keep 写作日历数据/ intact. See the index storage notes for format, rollback limits, and optimization scope.
The currently running focus timer remains local to the device and is not handed off between devices.
Do not delete the data folder casually: current file totals can be rescanned, but historical writing activity and completed focus sessions depend on the stored ledgers.
移动端输入性能:自动统计刷新、扫描和索引保存会避开连续输入,停止输入约 750 ms 后再更新;活动记录仍正常写入。隐藏统计界面不持续重绘,长文中文组字只比较编辑范围。详见 移动端输入修复说明。