Skip to content

Instantly share code, notes, and snippets.

@paulojeronimo
Last active June 28, 2016 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulojeronimo/134fae90308533daa9825713e7c09933 to your computer and use it in GitHub Desktop.
Save paulojeronimo/134fae90308533daa9825713e7c09933 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Notas:
# 1) Para a instalação do [graph] será necessário a execução anterior do seguinte comando:
# sudo dnf -y install git python
curl -sSL https://github.com/ginatrapani/todo.txt-cli/releases/download/v2.10/todo.txt_cli-2.10.tar.gz | tar xfz - -C /tmp
tdir=/tmp/todo.txt_cli-2.10
mkdir -p ~/bin && cd $_
cp $tdir/todo.sh .
chmod +x todo.sh
mkdir -p ~/.todo && cd $_
cat >> todo.cfg <<'EOF'
[ -d "$PWD/todo" ] && TODO_DIR="$PWD/todo" || TODO_DIR="$HOME/.todo"
export TODO_DIR
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
EOF
sudo cp $tdir/todo_completion /etc/bash_completion.d/todo
cat >> ~/.bashrc <<'EOF'
alias t='todo.sh -d ~/.todo/todo.cfg'
complete -F _todo t
EOF
# [graph]
mkdir -p ~/.todo.actions.d && cd $_
git clone https://github.com/timpulver/todo.txt-graph.git graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment