add new note creation script

This commit is contained in:
Antoine 2024-07-31 09:35:57 +02:00
parent 282bd25bbc
commit b96cf4b5ae

View file

@ -7,7 +7,7 @@ today_file="${daily_note_dir}/${today}_daily.md"
# Function to find unticked checkboxes in the most recent daily note # Function to find unticked checkboxes in the most recent daily note
find_unticked_checkboxes() { find_unticked_checkboxes() {
most_recent_file=$(ls -t ${daily_note_dir}/*_daily_note.md 2>/dev/null | head -n 1) most_recent_file=$(ls -t ${daily_note_dir}/*_daily.md 2>/dev/null | head -n 1)
if [[ -f "$most_recent_file" ]]; then if [[ -f "$most_recent_file" ]]; then
grep -E '^\s*[-*]\s+\[ \]' "$most_recent_file" grep -E '^\s*[-*]\s+\[ \]' "$most_recent_file"
else else
@ -28,7 +28,7 @@ else
echo "---" echo "---"
echo "# To-Do" echo "# To-Do"
find_unticked_checkboxes find_unticked_checkboxes
echo "- [ ]" echo "- [ ] "
echo "" echo ""
echo "# Logbook" echo "# Logbook"
echo "" echo ""