#looper #heavy #schedule #toml #path #routines #cli-command

looper_heavy

Heavy to compile stuff for looper

1 stable release

new 1.0.0 Dec 19, 2024

#4 in #heavy

Download history 62/week @ 2024-12-14

62 downloads per month
Used in girvel_looper

Custom license

6KB
104 lines

Looper — routine manager

looper is a personal task manager for reoccuring tasks, aiming to be as minimal & undercomplicated as possible. Basically a single TOML schedule (with TOML itself doing most of the heavy lifting) and small CLI frontend. looper has these goals:

  • exercise low software complexity
  • be as pleasant as possible to motivate own usage

TL;DR usage

Displaying the schedule:

looper show
[5] 20-Dec-2024
#0f  [today] advance alchemic knowledge
#00  [duty] journal tribe movements
#05  clean the staples
#0d  wash my pants
#0c  buy ritual paint (3), rags (3)

Upcoming:
#0a  [today] practice swordcraft  @20-Dec-2024 03:00
#06  clean the dungeon  @22-Dec-2024
#04  send anonymous prank letters to the King  @01-Jan-2025
#0b  hunt  @01-Jan-2025
#02  [!] change oil in lamps  @03-Jan-2025
#07  sell toenails  @15-Mar-2025
#09  [duty] fight hornets  @15-Mar-2025
#08  buy sausages (1000 lb)  @15-Mar-2025
#03  [!] feed the platypus bear  @01-Apr-2025

Completing tasks:

looper done 1d 0e 0c

Installation

cargo install girvel_looper

Configuration

Schedule is set in single TOML file. Use looper path schedule to get the path. The sections are cron expression strings, defining frequency of the following routines; each key-value pair is a single routine: the key is a globally unique ID (any string that would be comfortable to use; I prefer two-digit hexadecimal numbers), the value is a full description.

# today
["0 0 3 * * * *"]
0a = "[today] practice swordcraft"
0f = "[today] advance alchemic knowledge"

# sunday
["0 0 3 * * Sun *"]
00 = "[duty] journal tribe movements"
06 = "clean the dungeon"

See example. Note that state.toml is an autogenerated file.

Usage

  • Use looper show to show the upcoming routines
  • Use looper done ... to mark tasks as finished (even in advance)
  • A routine can be undone by vi $(looper path state) and removing the entry with needed ID; it is a rare situation, so I deliberately chose not to add another CLI command to keep simplicity
  • aliasing common cases in bashrc/zshrc file:
alias lp='looper'
alias lpe='e $(looper path schedule)'
function lps() {
    old_path=$(pwd)
    cd; cd dotfiles_private
    git add && git commit -m "#" && git push
    cd $old_path
}
  • keeping track of the next ID, naming sections, etc. via TOML comments
  • stow + git for configuration management

Dependencies

~2.3–3.5MB
~58K SLoC