blueheron7861k downloadsProvides methods to retrieve statistics about the vault, such as the number of notes, total word count, recently modified notes, and more.
A simple Obsidian plugin that exposes two handy global functions for vault statistics, which you can call from DataviewJS or other scripts:
showStats(): Returns markdown summary of vault note count, word count, links, and tags.showLastModifiedNotes(numItems = 10, excludeFolder = "Templates"): Returns markdown list of the most recently modified notes, excluding an optional folder.You can grab it from the Obsidian app, Community Plugins section.
Clone or download this repo.
Build the plugin with npm install and npm run build.
Copy the resulting main.js, manifest.json, and optionally styles.css to your vault plugin folder: /.obsidian/plugins/vault-stats/
Enable the plugin in Obsidian's Community Plugins settings.
Inside any note, create a DataviewJS block like this:
// Show general vault stats
let s = await window.showStats();
dv.paragraph(s);
// Show last modified notes (default 10, excluding "Templates" folder)
let recent = await window.showLastModifiedNotes(10, "Templates");
dv.paragraph("### 🕒 Last Modified Notes:\n\n" + recent);
You can customize numItems and excludeFolder arguments for showLastModifiedNotes.
The main plugin code is in main.ts.
Build with npm run build.
For development, use npm run dev to watch and rebuild on changes.
MIT License — feel free to use and modify.