[Plugin] TOC from selection
Hi zettlers!
I am new to this forum but hopefully it is okay to start participating by providing a plugin for The Archive app.
I am mainly worrying about violating ToS in this particulary paragraph: "If you want to promote your product (app, book, course, ...) and/or your writing, you should be an active community member or first ask the mods for permission. Ignoring this leads to immediate deletion of your account and your post." If plugins are considered as aforementioned apps, I apologize and ask for deletion of this post.
I have been using an Automator quick action in MacOS to make those nice "dotted" structure-note TOCs. Since TA has a plugin system I thought I might try to rewrite my Automator/Python thingy as a native plugin. And it worked! ![]()
Usage: select line(s) and execute
Example, text before:
Text after:
Caveats: I am not very familiar with JavaScript, so my experience with C might have influenced the way I wrote the code. If you are more professional with JS, feel free to modify it as you please.
Cheers!
JW
Howdy, Stranger!
Comments
Thanks for sharing the plugin! You're more than welcome to start like that
Author at Zettelkasten.de • https://christiantietze.de/
Thanks! Even though I finally managed to register in the forum, I have been visiting here for years already. Maybe it is finally time to show my appreciation for the community in a written form instead of just consuming others' contributions eagerly
And now it can be found in the github: https://github.com/jwayston/ta_toc