Scripts to generate timedot files for time tracking for use with hledger for reporting and budgeting.
Find a file
2023-04-11 17:30:11 +02:00
generate-week.sh chore: revamp to fit new standard 2023-04-11 17:23:26 +02:00
generate-year.sh chore: revamp to fit new standard 2023-04-11 17:23:26 +02:00
README chore: deprecate generate-week 2023-04-11 17:30:11 +02:00

generate-year.sh
----------------

usage:
    ./generate-year [year]

parameter [year] is optional, omit to use current year

user alias:

    function te {
        local date=${1:-$(date -I)}
        local year=$(date -d $date +%Y)

        local timedir="$HOME/plan/time"
        local archivedir="$timedir/archive"

        if [[ $year < $(date +%Y) ]]; then
            vim -c "/$date" $archivedir/$year.timedot
        fi

        vim -c "/$date" $timedir/$year.timedot
    }

generate-week.sh
----------------

/!\ deprecated in favour of generate-year.sh.

cron usage:

    1 0 * * 1 TEMPLATE="work               8" TIME_DIR=~/plan/time /home/varl/bin/generate-week.sh write

user alias:

    function te () {
        $EDITOR ~/plan/time/current.timedot
    }