Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/janst123/reminder_shortcut

This little node.js script will parse a natural human input that contains details for creating a task like it's known from todoist
https://github.com/janst123/reminder_shortcut

apple date human list natural-language natural-language-processing parse reminder shortcut todo todoist

Last synced: 1 day ago
JSON representation

This little node.js script will parse a natural human input that contains details for creating a task like it's known from todoist

Awesome Lists containing this project

README

        

# Parser natural text to reminder data

This little node.js script listens for a HTTP POST request on `/` and port 3000. It expects a **JSON payload** with one property `text` and an optional property `language`.

It will parse a string that contains details for creating a task like it's known from [Todoist](https://todoist.com).

## Localization

As the script uses [chrono-node](https://www.npmjs.com/package/chrono-node) for parsing dates, it supports all languages for date parsing which chrono-node supports. At the time writing these are `en, en_GB, de, pt, es, fr, ja`. You can pass the desired language in the `language` property of the JSON payload. It defaults to `en`

## Installation
Run `npm i` and then start the server with `node parse.js`. It will listen on `http://localhost:3000`

## Hosted service
This script is also hosted at https://reminder.jan8.de Feel free to use it.

## Usage Example

```sh
# default language: en
$ curl -X POST -H'Content-Type: application/json' -d'{"text": "tomorrow 10am doc appointment p1 #mylist"}' http://localhost:3000
{"list":"mylist","prio1":true,"date":"2024-08-30T08:00:00.000Z","text":"doc appointment"}

# with localization
$ curl -X POST -H'Content-Type: application/json' -d'{"text": "morgen 10am doc appointment p1 #mylist", "language": "de"}' http://localhost:3000
{"list":"mylist","prio1":true,"date":"2024-08-30T08:00:00.000Z","text":"doc appointment"}%
```

The output can be used by Apple "Shortcuts" App to create a new "Reminder" with natural input. You can download the Shortcut here:
https://www.icloud.com/shortcuts/b886cabf590341058077c64db7a6de58

Read more about it here: https://janpedia.de/en/software-en/quick-input-for-apple-reminders/