Scribe of Lagash - Goals and Stats

by Alejandro
5
4
3
2
1
Score: 50/100

Description

An Obsidian plugin that helps writers set goals and see detailed statistics for their story — word counts, progress toward goals, repeated words, and more. It is the second plugin in the "Scribe of Lagash" series, a set of independent, focused tools for planning and writing stories in Obsidian.

Reviews

No reviews yet.

Stats

1
stars
66
downloads
0
forks
10
days
6
days
6
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
1
total issues
0
open issues
1
closed issues
48
commits

Latest Version

7 days ago

Changelog

Added

  • "Count spaces in character counts" setting: character counts (file-explorer badges, the daily goal, and the goal history) can now include spaces and line breaks, matching Obsidian's own word-count status bar, instead of always excluding them like before. Existing writing-goal history is unaffected — days recorded before this setting shipped keep their original count either way, and every day from now on records both conventions so switching the setting later never changes how past days read. The daily goal and goal history measure "today's" characters-with-spaces from the real text actually typed (preserving double spaces, blank lines between new paragraphs, and so on), so it agrees with the file-explorer badge's count of the same note rather than reading a little low.
  • Changing the story folder to a different, already-in-use folder now asks for confirmation before applying: switching mid-day otherwise had no way to know where that folder's files stood at the start of the day, so their entire existing content would be counted as written today. Accepting starts today's count over at zero for the new folder; the previous folder's own history file is left exactly as it was, ready to resume from later.
  • Setting the story folder to a path that isn't an actual folder in the vault is now rejected with a notice, instead of being silently accepted and taking every note in the vault out of scope until the typo was noticed.
  • The story folder field now suggests matching folders as you type on every supported Obsidian version (1.10.0+), not just 1.13+.

Changed

  • The story folder setting is no longer applied on every keystroke like every other setting — type the path, then click "Set" (or press Enter) to apply it. Applying it live meant that briefly clearing the field to type a different path was indistinguishable from deliberately emptying it (which scans the whole vault), so doing that could rescan everything and create a stray goals-history file at the vault root before the new path was even finished being typed.

Fixed

  • "(SL) Goals History.json" no longer gets created immediately on installing the plugin, before a story folder is even chosen or a single character is written. A day with nothing written is indistinguishable from having no entry at all, so the file is now only created once there's an actual first character to record.

Full Changelog: https://github.com/aescanes/scribe-of-lagash-goals-stats/compare/0.7.5...0.8.0

README file from

Github

Scribe of Lagash - Goals and Stats

License: MIT Minimum Obsidian version

An Obsidian plugin that helps writers set goals and see detailed statistics for those goals and for the story as a whole. It is part of the Scribe of Lagash series, a set of independent, focused tools for planning and writing stories in Obsidian.

Installation

Requires Obsidian ≥1.10.0.

You can install it from the community plugins page, or download main.js, manifest.json, and styles.css from the latest release and copy them into <vault>/.obsidian/plugins/scribe-of-lagash-goals-stats/.

Scribe of Lagash Plugins

Scribe of Lagash is a series of independent, single-concern Obsidian plugins for planning and writing stories:

About the name

"Scribe" is the writer at the center of every plugin in the series, and "Lagash" nods to Nippur de Lagash, the classic Argentine comic.

Current features

  • Writing-goal widget — a right-sidebar view (ribbon icon or the "Open writing goal widget" command) with a ring for today's progress toward the daily goal, a week/month summary, and a month calendar colouring each day by whether it met, partly met, or missed the goal. History is kept in a plugin-managed file in the vault, so it survives a plugin uninstall/reinstall and travels with the vault through whatever the author already syncs it with.

  • Goals and Stats tab — a main-area tab (ribbon icon or the "Open Goals & Stats" command) with a "Writing goal history" section: week/month, rolling 7-/30-day, and year/365-day totals with daily averages, beside the same month calendar as the sidebar widget with today's total and, when clicked, any other day's total shown next to it.

  • Daily-goal celebration — the moment you reach the daily goal, a toast notification plus a confetti burst say so, and a status-bar item lights up for as long as it stays met, whether or not the writing-goal widget is open.

  • Writing session — a plain countdown timer in the writing-goal widget, unrelated to the daily goal or any particular day: 15/30/60-minute presets or a custom length, with the same ring styling as the daily-goal progress ring, play/pause, reset, and a toast plus a short bell sound once time's up. A session in progress survives closing Obsidian — reopening shows it paused, ready to resume with a click.

  • File-explorer counts — every note inside the story folder shows its word (or character) count next to its name in the file explorer, and every folder shows the total of the notes beneath it. Counts update as you write. Set a story folder in settings to count only that folder instead of the whole vault, and add specific notes or folders to the exclusion list to leave them out of the count entirely. Character counts default to "characters without spaces", so they'll read lower than Obsidian's own word-count status bar, which counts every character including spaces and line breaks — turn on "Count spaces in character counts" in settings to match that convention instead.

  • Writing-goal settings — a story folder (with folder autocomplete; switching it away from a different folder you've already used asks you to confirm first, since it starts today's writing count over for the new one — the previous folder's history is kept, ready to pick back up later), a words/characters metric (with a with/without-spaces toggle for characters), a daily goal, and the days of the week you write; the weekly and monthly targets are worked out from those. Plus a list of notes and folders to exclude from everything the plugin measures.

How "written today" is counted

Today's count isn't just "how much longer is the note now" — it's genuinely new writing, worked out by comparing what each note says right now to what it said at the start of the day and counting only the words that weren't there before. That has one nice effect: cleaning up old work doesn't punish you.

  • Deleting something you wrote on an earlier day never lowers today's count. Cut a whole tired paragraph from last week, reorganize a chapter, trim an old scene down to nothing — none of it counts against you, because none of it was written today.
  • Deleting something you wrote today does lower today's count, same as any ordinary word counter. Write a new sentence, then cut a couple of words from it before you're done for the day, and the count reflects what's actually on the page.

So the number always answers "how many new words are sitting in my story right now," not "how many keys did I press today" — a big cleanup of old material can never accidentally erase a day's progress.

Planned:

  • Goal targets — total word count and a deadline, per-chapter or per-scene length targets, and a projected completion date.
  • Goal stats — writing streaks and how each day compares to the target pace.
  • Story stats — total and per-chapter/scene word, sentence, and paragraph counts; average scene and chapter length; reading-time estimate. Will live in the Goals and Stats tab's "Story Stats" section (already there as an empty placeholder).
  • Repeated-word analysis — most-frequent words and phrases across the whole story or a single chapter, with common stop-words filtered out, to surface overused crutch words.
  • Per-story scoping — every statistic can be computed for one story folder or the whole vault.

See docs/feature-plans/ for the detailed plan of each feature (one file per feature).

Development

npm install
npm run dev    # watch build, outputs main.js
npm run build  # type-check + production build
npm test       # unit tests (Node's built-in runner; no test framework dependency)

Supply-chain safety

  • Every dependency in package.json is pinned to an exact version — no ^/~ ranges and no latest. .npmrc sets save-exact=true so future npm install <pkg> additions stay pinned by default.
  • .npmrc also sets ignore-scripts=true, so npm install/npm ci never runs a dependency's preinstall/install/postinstall script automatically. The only dependency that ships one is esbuild, and its script just optimizes linking its already-installed platform binary — the build works fine without it. On the rare platform where it doesn't (e.g. an environment without a matching prebuilt @esbuild/* package), run npm run rebuild:esbuild to explicitly and visibly opt that one script back in for that single command.

To try the plugin in a vault, copy (or symlink) manifest.json, main.js, and styles.css into <vault>/.obsidian/plugins/scribe-of-lagash-goals-stats/, then enable it from Obsidian's Community Plugins settings.

Contributing

Found a bug, or have a feature request? Open one on the GitHub Issues page — there's a template for each.

Contributions are welcome — see CONTRIBUTING.md for dev setup, code conventions, and the PR process. This project follows a Code of Conduct.

Found a security issue? See SECURITY.md instead of opening a public issue.

See CHANGELOG.md for release history.

License

MIT.