Fetch and maintain download statistics for an Obsidian Plugin
Project description
Obsidian Plugin Stats
Fetch and maintain Obsidian plugin download stats from the command-line.
Obsidian provides quite detailed statistics about its plugins in JSON format at https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugin-stats.json . These are easy to parse. I previously used the following script using curl and jq to get statistics:
curl --silent https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugin-stats.json | jq ".[\"${1:-plugin-repl}\"]"
One limitation is that these are statistics at a particular time. It would be nice to see these change over time so that I can have a feeling of progress.
For this reason, I made this tool which keeps track of statistics over time.
Installation
You can install this tool with pipx:
pipx install obsidian-plugin-stats
Usage
The following shows the number of downloads for the plugin plugin-repl
obsidian-plugin-stats plugin-repl
Note that this will return the same value for the entire day (though these statistics appear to only be updated daily anyway).
You can raw statistics with --raw like so:
obsidian-plugin-stats --raw plugin-repl
You can get a timeseries of historic data in the JSONL format using
obsidian-plugin-stats --timeline plugin-repl
To maintain statistics you may wish to run obsidian-plugin-stats daily using, for example, a systemd timer or cron job.
If this data is valuable to you might like to back up ~/.local/state/obsidian-plugin-stats. I have this symlinked to a directory which I back up.
Support
If you found this tool useful you could make a donation ($2 maybe?) on my ko-fi which will incentivize me to make and maintain tools like this.
Also, if you looked at this tool you are likely making a plugin for Obsidian. You may well be interested in my tool Plugin REPL which is designed to rapidly scripting Obsidian and iterating on plugins.
About me
I am @readwithai I make tools related to reading and research sometimes using the [Obsidian markdown editor]. I get quite a lot of value from using Obsidian for "drive-by" note taking while coding, Obsidian makes it easy to quickly find a page and jot down some notes in a place where you will find it again when thinking about the same thing. I wrote some notes about this here .
I also tend to produce a stream of productivity tools like this.
If any of this sounds interesting you can follow me on X where I write about this sort of thing. If you are interested in Obsidian, note-taking or research you might like my blog.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file obsidian-plugin-stats-2.0.1.tar.gz.
File metadata
- Download URL: obsidian-plugin-stats-2.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c58055dfd93deac819759e208f7f4a7d1bd29cffae8bc4e1d35315bd37b600ac
|
|
| MD5 |
3ba2ebbf7cb55026a3b5ee286c737ebc
|
|
| BLAKE2b-256 |
881e1c18036e1df960ce53dd9ea54967736f0317b803aec5243595ca2453b545
|