take heed, and proclaim that which you hath scried
Co-authored-by: oxaliq <git@oxaliq.net>
This commit is contained in:
commit
b61befa4ab
7 changed files with 262 additions and 0 deletions
35
proclaim
Executable file
35
proclaim
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# make username uppercase
|
||||
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
||||
timezone=UTC
|
||||
chatlog=/var/log/bunkchat/chat.log
|
||||
prompt=""
|
||||
|
||||
makeSlug () {
|
||||
# make time and date
|
||||
time=$(TZ=${timezone} date +%I:%M%p)
|
||||
date=$(TZ=${timezone} date +%m/%d)
|
||||
|
||||
# make name/time string
|
||||
prompt="${username}-${date}-${time}"
|
||||
}
|
||||
|
||||
# enter bunkchat mode (clear the screen)
|
||||
clear
|
||||
|
||||
while true
|
||||
do
|
||||
echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
|
||||
echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
|
||||
echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
|
||||
echo "Proclaim your musings, $USER! This is a group chat with everyone on the server!"
|
||||
echo "You may view current chat with 'heed'!"
|
||||
echo "You may view old chat with 'scry'!"
|
||||
echo "----------------------------------"
|
||||
printf "speak to the server: "
|
||||
read -r text
|
||||
makeSlug
|
||||
echo "${prompt}: $text" >> $chatlog
|
||||
clear
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue