Plugin: Set Alarms using natural language in todo title

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 :slight_smile: .

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 :stuck_out_tongue: 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

10 Likes

Thanks! This looks handy!

What do you mean? It is already available in Joplin...

So whatever you did, you did correctly. :grinning:

You can see it in the Plugin List

2 Likes

:partying_face: I set it up after seeing a bit of interest here :grinning:. And it's more convenient for my own use across multiple devices.

Now it auto builds and publishes when I push a version tag to GitHub. I also found there are now easy ways to share GitHub actions so I can use my ci code across multiple plug-in projects joplin-plugin-auto-alarm/ci.yml at main · zph/joplin-plugin-auto-alarm · GitHub.

2 Likes

I did the same for my auto tag plugin :cowboy_hat_face:

Nice. I like that. If I understood you correctly there is another internal possibility on how to setup a notification?

Edit: I found it it is the bell on the top right
image