Add files via upload

This commit is contained in:
everest 2022-05-16 21:28:45 +00:00 committed by GitHub
parent 2d8167efca
commit 9937799974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 0 deletions

7
INSTALL.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
cp now.sh now
mv now /usr/bin
mv now.conf /etc
mkdir ~/.config/now
mv events.sh ~/.config/now

29
events.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# ~/.config/now/events.sh
# Script which will define events
export now_event_1=""
export now_event_2=""
export now_event_3=""
export now_event_4=""
export now_event_5=""
export now_event_6=""
export now_event_7=""
export now_event_8=""
export now_event_9=""
export now_event_10=""
export now_event_11=""
export now_event_12=""
export now_event_13=""
export now_event_14=""
export now_event_15=""
export now_event_16=""
export now_event_17=""
export now_event_18=""
export now_event_19=""
export now_event_20=""
export now_event_21=""
export now_event_22=""
export now_event_23=""
export now_event_24=""
export now_event_25=""

17
now.conf Normal file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# /etc/now.conf - now configuration file
# Define colors and unicode symbols to be used
export red="\033[1;31m"
export green="\033[1;32m"
export yellow="\033[1;33m"
export blue="\033[1;34m"
export reset="\033[m"
export check="\xE2\x9C\x93"
export error="\xE2\x9C\x95"
export warning="\x21"
export question="\x3F"
# Current date
export now_current_date=$(date)

60
now.sh Normal file
View File

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