23
loading...
This website collects cookies to deliver better user experience
today.taskpaper
. The Taskpaper format is pretty simple. Projects are on a line by themselves and end with a :
. Tasks are on their own lines, and start with a -
. Here’s a sample file:Errands:
- Check out that car
- Drop off packages
Grocery:
- Milk
- Eggs
- Diet Mountain Dew
- Ho Hos
@
in front of whatever word you want to use. For example, @due(2021-12-24)
would be a due date for a task, and @start(2021-11-30)
could be a start date. The @ words used are up to you, and you can use whatever you want. To complete a task, you add @done(YYYY-MM-DD) to the task line.Get milk +grocery @errands
Check out that car @errands
Ho Hos +grocery @errands
Diet Mountain Dew +grocery @errands
(A) Ho Hos +grocery @errands.
Extra information that you may want to put with a task can be added as a key:value
pair, such as due dates (due:2021-12-24
) or threshold (start) date (t:2021-11-30
).x
to the beginning of the line. You can also add done:YYYY-MM-DD
to the line to record the date completed.Lists
. To work with the lists at the command line, I use the todo.txt bash script for the todo.txt
file. For the .taskpaper files I use Vim and the Taskpaper plugin. If you were working from the GUI, there are plugins for VS Code or several different apps to use.todo.txt
file and looks for tasks with a due dates of today. The script runs at midnight. The script adds a priority of (A)
for tasks due today, and then it sends me a list of tasks that have a priority set.#!/bin/bash
nl=$'\n'
#TelegramBot
# .telegraminfo has the bot API key and my Telegram chat ID
source ~/.telegraminfo.cfg
#Where are the tasks
TASKS="${HOME}/notes/Lists/todo.txt"
temp="/tmp/temp.todo.txt"
# Delete the temp file if it exists
[-f ${temp}] && rm "${temp}"
# Loop through the file and look for tasks due today
# Set the priority to (A)
while read i || [[-n $i]]; do
if [[${i} =~ "due:${TODAY}"]]; then
echo "(A) ${i}" >> "${temp}"
else
echo "${i}" >> ${temp}
fi
done < "${TASKS}"
mv "${temp}" "${TASKS}"
#Message what is due today
DUE=""
# Anything with a priority set will be sent
while read i || [[-n $i]]; do
if [[${i} =~ ^\(.\)\]]; then
DUE+="${i}${nl}"
fi
done < ${TASKS}
# Send to Telegram
read -r -d '' MSG <<EOT
Tasks due ${TODAY}:
${DUE}
EOT
/usr/bin/curl -s -X POST \
https://api.telegram.org/bot${APIKEY}/sendMessage \
-d text="${MSG}" \
-d parse_mode="Markdown" \
-d chat_id=${TO} > /dev/null