/go-later

:pencil: Simple "To Do" app for temporary tasks

Primary LanguageGo

go-later

Simple terminal "To Do" application that I came up with to simplify my small temporary work tasks.

Requirements

  • Latest Go release (tested on 1.20, 1.21; most probably won't work below 1.18)

Usage

  1. Clone the repo using git clone
  2. Build the binary using the following command in the root directory of the cloned repository:
make  # which is equal to: "go build -mod vendor -o later ./cmd/later/."
  1. Make sure that the build process finished successfully and that the binary file later exists in the root directory of the repository
  2. Validate that the application works - run the later binary to see available commands:
./later
  1. Integrate later with your shell of choice; append the following lines to the end of your shell configuration file (for zsh it is the ~/.zshrc file). Note: please, adjust <YOUR_PATH> in the snippet below to your own path with the later binary (pay attention to the ! NOTE markers). Feel free to modify commands as you wish:
# later (to do task list) binary and its aliases
# ! NOTE (1): please, make sure that `later` binary is built first
# ! NOTE (2): please, make sure that you set the correct path to the `later` binary (<YOUR_PATH>)
export PATH="$HOME/<YOUR_PATH>/go-later:$PATH"
# 'tdh' is a short reminder of available aliases
alias tdh="echo 'td (add), tdl (list), tdp (pop), tdd (delete), tdc (clean)'"
# 'td' is a default alias to add tasks to the list
alias td="later push"
# 'tdl' lists all the saved for later tasks
alias tdl="later list"
# 'tdp' removes the last task from from the list
alias tdp="later pop"
# 'tdd' removes the exact task (by ID) from the list
alias tdd="later delete"
# 'tdc' cleans up the tasks storage (homedir/.later)
alias tdc="later clean"
echo "Tasks to do: $(later count) (use \"tdl\" to see)"
  1. Restart the terminal, and verify that integration with later works (macOS iTerm2 example below):
Last login: Sat Sep 30 01:47:51 on ttys001
Tasks to do: 0 (use "tdl" to see)
➜  ~ td do this later
➜  ~ tdl
1. do this later (created at: 2023-09-30 01:49:12)
➜  ~ tdh
td (add), tdl (list), tdp (pop), tdd (delete), tdc (clean)