1.1.0 • Published 2 years ago

linux_reminder v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

:trumpet: Overview

Schedule daily reminders easily with a simple config file. Organize and receive alerts for important tasks efficiently.

:question: Motivation

My primary motivation for developing this tool was to ensure I don't miss my main daily tasks, such as those related to nutrition, due to being overly focused on work.

:warning: warning: The reason I opted for the at command to schedule tasks, instead of the popular crontab, was because the latter couldn't properly execute the spd-say and notify-send commands. Despite searching for about 2 hours, I didn't find a successful solution.

:dart: Features

   ✔️ type safe api methods by using zod validation;    ✔️ three ways to specify task frequency: weekday, weekend or everyday;    ✔️ option to speach the name of the task;    ✔️ option to choose the notification style between: notify-send or zenity.

:warning: Requirements

In order to use this project in your computer, you need to have the following items:

  • npm: To install the package. Npm is installed alongside nodejs;
  • nodejs: To actually run the package.
  • at: To schedule the tasks to run on specified times.
  • zenity: to show custom notifications (optional).

:bulb: Usage

First, make sure to install the at command on linux, which will be used to schedule the reminders:

sudo apt install at

Install the linux_reminder npm package:

# Install the package
npm install linux_reminder -g

Create a reminder configs file such as this (which follows this schema):

{
  "options": {
    "playTextToSpeech": true
  },
  "reminders": [
    {
      "name": "launch",
      "category": "NUTRITION",
      "time": "13:15",
      "days": "everyday"
    },
    {
      "name": "shutdown PC",
      "category": "habits",
      "time": "23:00",
      "days": "everyday"
    }
  ]
}

After that, open a terminal and paste this:

echo $(which node) $(which linux_reminder)
# /home/lucasvtiradentes/.nvm/versions/node/v18.19.0/bin/node /home/lucasvtiradentes/.nvm/versions/node/v18.19.0/bin/linux_reminder

Get the above command result and join with the -s path_of_your_config.json, in my case it would be:

/home/lucasvtiradentes/.nvm/versions/node/v18.19.0/bin/node /home/lucasvtiradentes/.nvm/versions/node/v18.19.0/bin/linux_reminder -s "/home/lucasvtiradentes/Desktop/configs.json"

# tip: make sure to specify the absolute path, do not use $USER/Desktop or ~/Desktop

Finally you can copy the above command and past it on a new instance of Ubuntu's Startup Applications.

And thats it! Now everytime your Ubuntu startup, it will setup all the current day's reminders!

Available configs options

{
  "playTextToSpeech": true,
  "useZenitAsNotifierSender": false,
  "notificationExpireSeconds": 1000
}

Notice that if you specify to use zenity, you'll need to have it installed.

Available CLI options

Usage: linux_reminder [options]

⏰ simple crontab based reminder designed to be used in daily tasks on linux.

Options:
  -V, --version       output the version number
  -s, --setup <file>  setup the reminders to run on the specified datetimes
  -r, --remove        remove all configured reminders
  -l, --list          list all configured reminders
  -h, --help          display help for command

:wrench: Development

Development setup

To setup this project in your computer, download it in this link or run the following commands:

# Clone this repository
$ git clone https://github.com/lucasvtiradentes/linux_reminder

# Go into the repository
$ cd linux_reminder

After download it, go to the project folder and run these commands:

# Install dependencies using npm
$ npm install

# Run the typescript code in development mode
$ npm run dev

If you want to contribute to the project, after you make the necessary changes, run these commands to check if everything is working fine:

# Compile the code into javascript
$ npm run build

# Run the compiled code in production mode
$ npm run start

Used technologies

This project uses the following thechnologies:

:books: About

License

This project is distributed under the terms of the MIT License Version 2.0. A complete version of the license is available in the LICENSE file in this repository. Any contribution made to this project will be licensed under the MIT License Version 2.0.

1.1.0

2 years ago

1.0.0

2 years ago