Skip to content

gwirn/Cicada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cicada 🦗

Command lIne CAlenDAr

Simple command line calendar with encrypted storage file

Shows appointments and can alert when appointments are due.

TEST

            May 2023
 Mo  Tu  We  Th  Fr  Sa  Su
  1   2   3   4∆  5   6   7 
  8   9  10  11  12  13  14 
 15  16  17  18  19  20  21 
 22  23  24  25  26  27  28 
 29  30  31 

Installation

Install rust and cargo

Change the directory path to an absolute path so calender can be run from everywhere for these 3 files:

  • The date storage file
    const DATE_FILE_PATH: &str = "./src/dates/date.file";
  • The file containing the password used for de-/encrypting the date storage file
    const PWD_LOC: &str = "./src/dates/.pwd";
  • The file containing the salt for the password
    const SALT_LOC: &str = "./src/dates/.salt";
  • The file where the ids of already alerted appointmens are stored
    const ALERT_LOC: &str = "./src/dates/.alerted";
    Run cargo build --release to create a binary of the program.

If you want a faster version go back to this ab2af0cb14e9f06685caa38b1500de6ce6059b2f commit. The file ecryption makes it slower.

Options and functionality

The default mode of the calendar is just the current month. The current day is highlighted in bold green. A red ∆ on the right side of the day indicates an appointment.

-h | --help   <None>
     Print help message and exit

   | check   <None>
     Check for upcoming appointments and show notification if some are upcoming

-n | --next   <usize>
     Print next n appointments

-p | --prev   <usize>
     Print previous n appointments

-gda | --grepdate   <String>
     Search for all dates with a specific pattern
     e.g. '4-' for all appointments on 4th

-gde | --grepdes   <String>
     Regex pattern to search in date description

-l | -last_added   <usize>
     Show the n last added appointments

-d | --delete   <String>
     Provide an id of the appointment that should be removed

-a | --add   <String>
     Add new appointment in the form '04-05-2022-02:00,2.0,1.5,description of appointment'
     This specifies the date-the time, the duration in hours, 
     the number of hours before the event to show an alert and a description
     The single quotes around the string are needed 
     The date format is %d-%m-%Y-%H:%M

-m | --month   <u32, i32>
     Show calendar of specified month in given year like 5 2022

To check your calendar continously you can set a job in crontab that runs calendar check every n minutes to get alerts for upcoming events.

About

Command line calendar

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages