bunkdeck/proclaim

34 lines
1 KiB
Text
Raw Normal View History

#!/bin/sh -e
2024-02-09 20:13:25 +00:00
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
timezone=UTC
chatlog=/var/log/bunkchat/chat.log
prompt=""
2024-02-09 20:13:25 +00:00
makeSlug () {
# make time and date
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} date +%m/%d)
2024-02-09 20:13:25 +00:00
# make name/time string
prompt="${username}-${date}-${time}"
2024-02-09 20:13:25 +00:00
}
# enter bunkchat mode (clear the screen)
clear
while true
do
echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
echo "You may view old chat with 'scry'!"
echo "----------------------------------"
printf "speak to the server: " >&2
read -r text
makeSlug
echo "${prompt}: $text" >> $chatlog
clear
2024-02-09 20:13:25 +00:00
done