local-bin/common/noter

20 lines
412 B
Bash
Executable file

#!/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 compile 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