I'm sharing my first Joplin plugin, called auto-alarm (GitHub - zph/joplin-plugin-auto-alarm: Joplin plugin for auto-setting alarm based on Natural Language in Title).
Summary
I find myself frequently needing to setAlarm for due dates on todos, but find it cumbersome to cmd-shift-p to manually enter them.
Instead, I want it to know what I want by including the due date description in natural language in my todo title....
Features
Type a time/date phrase as part of your title for a todo and it will automatically parse that date text and set an alarm for the time.
Examples of todo subject lines that should work:
- Review my calendar in one day
- Setup a new routine on Monday
- Submit expense report on Dec 3rd
If it parses incorrectly or you want it to re-evaluate, edit the title and then clear the alarm.
How to install
The JPL is available to install directly from Github Releases (Releases · zph/joplin-plugin-auto-alarm · GitHub) and if there's interest here I'll figure out about registering it correctly .
How it works
When onchange events are fired for the todo, those are passed through into library for natural language time/date parsing (GitHub - wanasit/chrono: A natural language date parser in Javascript). The processing of these events is debounced, in order to not enter an infinite onchange loop and to not prematurely set the alarm time before you've finished typing. So essentially it waits until X seconds after you stop editing the todo, then performs natural language processing.
Bonus
I'm iterating on easier ways to develop the plugin, so I setup a few helpers in the repo including:
- Github actions to build the plugin when I tag a version
- Makefile for common behaviors
- Using earthly for consistent local and CI experience of building plugin
Those helpers were useful in my 2nd and 3rd plugin I recently wrote, so I might package them up separately incase they help others develop.
Cheers,
ZPH