21 lines
412 B
Bash
Executable File
21 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>: ${@}</p>\n" >> $current_note
|
|
fi
|
|
|