git clone "$1"
}
+daily_todo_file_template() {
+cat << EOF
+===============================================================================
+$(date '+%F %A')
+===============================================================================
+
+
+backlog
+-------------------------------------------------------------------------------
+EOF
+}
+
todo() {
local date
- local timestamp
- local bar
- date=$(date +%F)
- timestamp=$(date '+%F %A')
- bar=$(for _ in {1..80}; do printf '='; done)
+ date="$(date +%F)"
local -r dir="$DIR_TODO/daily"
local -r file="$dir/$date.txt"
mkdir -p "$dir"
if [ ! -f "$file" ]
then
- printf '%s\n%s\n%s\n' "$bar" "$timestamp" "$bar" > "$file"
+ daily_todo_file_template > "$file"
fi
cd "$DIR_TODO" && "$EDITOR" "$file"
}