local-bin/common/noter

21 lines
412 B
Plaintext
Raw Permalink 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 () {
2024-02-28 09:31:26 +02:00
cd $site_dir && make compile push publish
2024-02-28 09:25:18 +02:00
}
if [ -z "$1" ]; then
cd $site_dir && ./noter/writer.sh public
elif [[ "$1" -eq "publish" ]]; then
publish
else
2024-04-19 11:59:57 +03:00
echo -e "<p><b>$(echo $timestamp)</b>: ${@}</p>\n" >> $current_note
2024-02-28 09:25:18 +02:00
fi