local-bin/common/noter

21 lines
404 B
Text
Raw Normal View History

2024-02-28 09:25:18 +02:00
#!/bin/sh
site_dir="$HOME/Projects/siina.monster"
current_date=$(date +%Y-%m-%d)
timestamp=$(date +%H:%M:%S)
current_note="$site_dir/notes/${current_date}.txt"
publish () {
cd $site_dir && make push publish
}
if [ -z "$1" ]; then
cd $site_dir && ./noter/writer.sh public
elif [[ "$1" -eq "publish" ]]; then
publish
else
echo -e "<p><b>$(echo $timestamp)</b>: ${1}</p>\n" >> $current_note
fi