~grauwoelfchen/lounge

Tools and data of book reading logs
Update 979-8-8472-143-7.toml
Update 979-8-8472-143-7.toml
Update 978-1-7185-0202-4.toml

refs

trunk
browse  log 

clone

read-only
https://git.sr.ht/~grauwoelfchen/lounge
read/write
git@git.sr.ht:~grauwoelfchen/lounge

You can also use your local clone with git send-email.

#Lounge

Tools and data of my book reading logs.

#Tools

#Requirements

  • Racket

#Setup

# install dependencies
% make setup

#Build

# to build the `bar` CLI application
% make build

#Test

# use rackunit
% make test

#Usage

# make sure if you configure the local path in .autoenv (see .autoenv.sample)
% cd /path/to/lounge

#Bar

bar is a binary command shows bar s of reading progress.

# print progress bars
% bar
His Dark Materials Northern Lights:
Reading [==-------------------------------------------] 18/397 4.53%

Learning Go:
Reading [=======================================------] 291/340 85.59%

Rust in Action:
Reading [==-------------------------------------------] 23/417 5.52%

Programming Elm:
Reading [====-----------------------------------------] 25/270 9.26%

#Suit

suit is a small shell script that finds a name of a suit able target file (ISBN code) with partial letters input from book titles, and opens it via your $EDITOR.

You don't need to build it. But, this requires the fuzzy finder fzf. See the bin/suit.

# print a list of pairs like `(isbn, title)`, and gives it to `fzf`.
#
# e.g.
#
#   ...
#   (978-1-83855-833-5, Mastering Go)
# > (978-1-492-07721-3, Learing Go)
# 4/24 ───────────────────────────────────────────────────────────────────────
# > Go
% suit

The filtering part is equivalent with:

% ls data/*.toml | \
xargs head -3 | \
awk '{
  if ($1 ~ /^title|^isbn/) {
    s=substr($0, index($0, $3));
    gsub("\"", "", s);
    print s;
  }
}' | \
awk '!(NR % 2) {
  print "("$0", "p")"
} {
  p = $0
}' | \
fzf

#Sofa

sofa does nothing so fa r (TBD).

# print nothing. feel relaxed.
% sofa

#License

BSD-3-Clause

Lounge
Copyright (c) 2023 Yasuhiro Яша Asaka