This morning, I decided to update a 3-year-old Nim docset for Zeal (If you don't know - Zeal is a program for browsing documentation pages offline and Docset is the format it uses) as a small one hour project, or so I thought at the time.
But I was too annoyed with few things:
After a couple iterations, I rewrited it all in Nim. The result is Nimrarian.
Nimrarian is a CLI tool you can use to convert any Nim documentation (generated with --index:on) to a Docset for local browsing and search.
Codeberg Repo: https://codeberg.org/janAkali/nimrarian
Dependencies:
You can install nimrarian with nimble:
nimble install https://codeberg.org/janAkali/nimrarian
Then generate documentation for your favorite Nim project:
nim doc --project --index:on --outdir:docs someproject.nim
And finally, generate the docset:
nimrarian --outdir:$HOME/docsets --name:someproject --icon:icon.png docs
This took much more than an hour, but now converting full Nim Documentation takes less than a second. I hope, it'll be useful to some of you.
Oh, and I almost forgot, you can get the updated Docset file for Nim 2.2.8 from codeberg:janakali/nim-docset.
If you don't know - Zeal is a program for browsing documentation pages offline and Docset is the format it uses
I don't know it. Is it possible to add remove library docs to/from it on installation/de-installation? In theory?
I can't think of an easy way to do this. There's certainly no such functionality in the app.
You would need to write a custom script/program to generate and cleanup docsets every time you run nimble or atlas (maybe using a thin async wrapper?).