now/scripts/now.sh
lw-everestlinux 36512d80e9 1.0
2022-08-04 11:29:06 -04:00

64 lines
1.6 KiB
Bash

#!/bin/sh
# now - a simple to-do list written in POSIX sh
# Preloading
source /etc/now.conf
source ~/.config/now/events.sh
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
printf "$blue now - a simple to-do list written in POSIX sh $reset\n"
printf "now {-h --help} show this message\n"
#printf "now {-a --add} [name] [date] [time] add an event\n" # This flag is deprecated
printf "now {--version} show the current version of now\n"
printf "\n"
printf "Events can be added by editing ~/.config/now/events.sh\n"
printf "If you would like to manually export the events instead, remove 'source ~/.config/now/events.sh'\n"
printf "This program is free software: see the GNU GPL v3.0 for details\n"
exit 0
;;
--version)
printf "$blue now - v1.0 $reset"
exit 0
;;
-*|--*)
printf "$red Unknown option, use --help to see usage $reset"
exit 1
*)
printf "$red Unknown option, use --help to see usage $reset"
;;
esac
done
printf "$blue To do for $now_current_date: $reset\n"
printf ""
printf "$now_event_1"
printf "$now_event_2"
printf "$now_event_3"
printf "$now_event_4"
printf "$now_event_5"
printf "$now_event_6"
printf "$now_event_7"
printf "$now_event_8"
printf "$now_event_9"
printf "$now_event_10"
printf "$now_event_11"
printf "$now_event_12"
printf "$now_event_13"
printf "$now_event_14"
printf "$now_event_15"
printf "$now_event_16"
printf "$now_event_17"
printf "$now_event_18"
printf "$now_event_19"
printf "$now_event_20"
printf "$now_event_21"
printf "$now_event_22"
printf "$now_event_23"
printf "$now_event_24"
printf "$now_event_25"
exit 0