Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: JSON reminder entry, as an independent command to add an entry #94

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgiugliano
Copy link

Enabling setting the "recurring" properties of a reminder, and future extension, this pull requests adds a new command: add-json.

This receives an input JSON-formatted string, containing all the reminders properties (including the listName).

json_string='{
  "title": "Buy groceries",
  "notes": "Milk, eggs, bread, cheese",
  "dueDate": "2025-02-15T10:24:00Z",
  "priority": "medium",
  "listName": "Groceries",
  "recurring": "weekly",
}'``` 

One could then invoke reminders simply as:

$ reminders add-json $json_string


In this way, simple shell aliases or other programmatic means can feed other properties to the reminder at the time of its creation. The ```format``` flag can be still specified (controlling the output of reminders), but I did not test it thoroughly.

Note I have explored startingDate, url, and other properties/attributes but failed to make them all work. The argument of "recurring" could definitely be improved. It currently accepts: daily, weekly, monthly, yearly. Maybe this could be of help to other people.

Thanks for your excellent work and for (indirectly) showing me "swift", which I am still a complete noob about. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant