<commit_before>#!/bin/bash

source zimcommon.sh

THISMONTH="$DIR.txt"
LASTMONTH="$JOURNALDIR/`date +'%Y/%m.txt' -d 'last month'`"
TAGS="@Year$(date +%Y)"
if [ ! -f "$THISMONTH" ] ; then

echo -e "Content-Type: text/x-zim-wiki
Wiki-Format: $(zim --version | head -n1)
Creation-Date: $(date +"%FT%T%:z") \n
====== $(date +"%B %Y") ====== \n
$TAGS \n
==== Quote ==== \n
$(fortune)\n
==== Tasks ==== \n\n" > "$THISMONTH"


echo -e "=== FROM LAST MONTH ($(date +'%B %Y' -d 'last month')) ===\n\n" >> "$THISMONTH"
movetasks "$LASTMONTH" "$THISMONTH"

cd $DIR
git add "$THISMONTH"
git commit "$THISMONTH" -m "Initial commit: $(date +'%B %Y')"

fi
<commit_msg>a little bit of cleanup and a monthly tasks<commit_after>#!/bin/bash

source zimcommon.sh

THISMONTH="$DIR.txt"
LASTMONTH="$JOURNALDIR/`date +'%Y/%m.txt' -d 'last month'`"
MONTHLY="$NOTESDIR/1_-_to-Do/Monthly_Tasks.txt"
TAGS="@Year$(date +%Y)"
if [ ! -f "$THISMONTH" ] ; then

echo -e "Content-Type: text/x-zim-wiki
Wiki-Format: $(zim --version | head -n1)
Creation-Date: $(date +"%FT%T%:z") \n
====== $(date +"%B %Y") ====== \n
$TAGS \n
==== Quote ==== \n
$(fortune)\n
==== Tasks ==== \n\n" > "$THISMONTH"


echo -e "=== FROM LAST MONTH ($(date +'%B %Y' -d 'last month')) ===\n\n" >> "$THISMONTH"
movetasks "$LASTMONTH" "$THISMONTH"

if [ -f "$LASTMONTH" ] ; then
    if [ "$(grep -c '\[ \]' "$LASTMONTH" )" -gt 0 ] ; then
        sed -i -e '/~~/!s/\[ \] /\[x\] ~~/' -e '/~~.*~~/!s/~~.*$/&~~/' "$LASTMONTH"
        #Strike out yesterday's tasks.
        "$HOME/.dotfiles/scripts/dedupzim.py" < "$LASTMONTH" | sponge "$LASTMONTH" #little bit of cleanup
        cd "$JOURNALDIR"
        git add "$LASTMONTH"
        git commit "$LASTMONTH" -m "Moving tasks from $(date -d 'last month' +%F) over to $(date +%F)"
    fi
fi


echo -e "=== MONTHLY TASKS ===\n\n" >> "$THISMONTH"
movetasks "$MONTHLY" "$THISMONTH"

cd $DIR
git add "$THISMONTH"
git commit "$THISMONTH" -m "Initial commit: $(date +'%B %Y')"

fi

{'fraction_non_alphanumeric': 0.261758691206544, 'fraction_numerical': 0.002044989775051125, 'mean_word_length': 3.5196304849884528, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2603606', 'n_tokens_mistral': 864, 'n_tokens_neox': 829, 'n_words': 214}