Rename scripts

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2019-03-06 16:53:16 +01:00
parent df6b44e541
commit 410d0b33c6
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
46 changed files with 566 additions and 249 deletions

33
system/.local/bin/todo Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# todo
#
# AUTHOR:
# Severin Kaderli <severin.kaderli@gmail.com>
#
# DESCRIPTION:
# Lists the TODOs.
#
# USAGE:
# ./todo
clear
while read -r line
do
task=$(echo "${line}" | cut -d "," -f 6)
project=$(echo "${line}" | cut -d "," -f 4 | sed -e "s/^#//")
datetime=$(echo "${line}" | cut -d "," -f 3)
echo -e "[${datetime}][${project}]\n☐ ${task}\n"
done <<< "$(todoist s && todoist --csv list --filter "(overdue | today)")"
TODOS=$(rg -g "!todo" --hidden --no-heading -n "TODO:" "${HOME}/dotfiles" "${HOME}/Projects")
if [ -n "${TODOS}" ]; then
while read -r line; do
file=$(echo "${line}" | cut -d ":" -f 1 | sed -e "s/^[[:space:]]*//")
lineNumber=$(echo "${line}" | cut -d ":" -f 2 | sed -e "s/^[[:space:]]*//")
task=$(echo "${line}" | cut -d ":" -f 4 | sed -e "s/^[[:space:]]*//")
echo -e "[Line ${lineNumber}][${file}]\n☐ ${task}\n"
done <<< "${TODOS}"
fi