about summary refs log tree commit diff stats
path: root/src/main.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.fnl')
-rw-r--r--src/main.fnl51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main.fnl b/src/main.fnl new file mode 100644 index 0000000..79fed85 --- /dev/null +++ b/src/main.fnl
@@ -0,0 +1,51 @@
1;;; RADISH
2;; A tuner for various streams
3;; Copyright (C) 2022 Case Duckworth <acdw@acdw.net>
4;; License: Good Choices (https://acdw.casa/gcl)
5
6(local util (require :util))
7(local pls (require :pls))
8(local radish (require :lib))
9
10(fn usage [?exit-code]
11 (print "RADISH: a tuner for various streams
12Copyright (C) 2022 Case Duckworth <acdw@acdw.net>
13License: Good Choices (https://acdw.casa/gcl)
14
15Commands
16 radish [STATION]
17 Begin playing STATION. If STATION is not
18 provided, display a list of favorites and
19 allow the user to choose one to play.
20 radish play [STATION]
21 Begin playing STATION. If STATION is not
22 provided, play the most recently-played.
23 radish kill
24 Kill the currently-playing station.
25 radish add [STATION]
26 Add STATION or the currently-playing one
27 to the favorites list.
28 radish del [STATION]
29 Remove STATION or the currently-playing
30 one from the favorites list.
31 radish edit [STATION]
32 Edit the information of STATION, or the
33 current one if not given.
34
35See radish(1) for more details.")
36 (os.exit (or ?exit-code 0)))
37
38(fn main [...]
39 "Program entry point.
40See `usage' for usage details."
41 (match [...]
42 [:help] (usage)
43 [:play ?station] (radish.play ?station)
44 [:kill] (radish.kill)
45 [:add ?station] (radish.add ?station)
46 [:del ?station] (radish.del ?station)
47 [:edit ?station] (radish.edit ?station)
48 [station] (radish.play ?station)))
49
50(main ...)
51