]>
Commit | Line | Data |
---|---|---|
f1d839f5 JN |
1 | # Babashka Scripts |
2 | ||
ec37ad05 | 3 | Miscellaneous [babashka](https://babashka.org "babashka website") scripts written for my own personal use. |
f1d839f5 JN |
4 | |
5 | ## Requirements | |
6 | ||
ec37ad05 | 7 | babashka (>= 0.4.0) |
f1d839f5 JN |
8 | |
9 | ## Usage | |
10 | ||
11 | Clone this repository. | |
12 | ||
13 | ``` sh | |
f1d839f5 JN |
14 | git clone https://njoseph.me/gitweb/babashka-scripts.git |
15 | ``` | |
16 | ||
ec37ad05 | 17 | The list of available commands can be found by running `bb tasks` in the directory where the file `bb.edn` is present. |
f1d839f5 | 18 | |
300f9af5 JN |
19 | ``` sh |
20 | The following tasks are available: | |
21 | ||
22 | gup Do a git pull and rebase branch with master in a given directory. | |
23 | gpa Runs `git pull` on all the git repositories in a given directory. | |
24 | ebook-to-audiobook A utility to listen to your ebooks using TTS programs. Only tested on macOS with epub files. | |
25 | install-deb Install a Debian package given a direct URL to the .deb file. | |
26 | install-deb-gh Install a Debian package given a GitHub URL. | |
27 | ``` | |
28 | ||
ec37ad05 | 29 | Some tasks can also take arguments. |
00a96276 JN |
30 | |
31 | ``` sh | |
ec37ad05 | 32 | bb ebook-to-audiobook the-great-gatsby.epub |
00a96276 | 33 | ``` |
66364757 | 34 | |
30f43df5 | 35 | ## Shell aliases |
66364757 JN |
36 | |
37 | ``` sh | |
30f43df5 JN |
38 | # bash, zsh |
39 | source /path/to/babashka-scripts/bb-aliases.sh | |
40 | alias task = bb --config ~/dev/babashka-scripts/bb.edn | |
41 | ||
42 | # nu | |
43 | source /path/to/babashka-scripts/bb-aliases.nu | |
44 | alias task = bb --config ~/dev/babashka-scripts/bb.edn | |
45 | ``` | |
46 | ||
47 | *Example:* To pull all the repositories in a directory, run | |
48 | ||
49 | ``` sh | |
50 | task gpa . | |
66364757 JN |
51 | ``` |
52 | ||
30f43df5 JN |
53 | There is a utility `bbe` to run tasks in the current working directory in `bb-aliases.sh`. |
54 | ||
55 | ||
66364757 JN |
56 | *Example:* To pull all the repositories in a directory, run |
57 | ||
58 | ``` sh | |
59 | bbe gpa | |
60 | ``` |