From c9a942aca66903d817b3b7df46488451a0bd7004 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 21 Aug 2022 18:02:46 -0500 Subject: Move into src/ --- src/main.fnl | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/main.fnl (limited to 'src/main.fnl') 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 @@ +;;; RADISH +;; A tuner for various streams +;; Copyright (C) 2022 Case Duckworth +;; License: Good Choices (https://acdw.casa/gcl) + +(local util (require :util)) +(local pls (require :pls)) +(local radish (require :lib)) + +(fn usage [?exit-code] + (print "RADISH: a tuner for various streams +Copyright (C) 2022 Case Duckworth +License: Good Choices (https://acdw.casa/gcl) + +Commands + radish [STATION] + Begin playing STATION. If STATION is not + provided, display a list of favorites and + allow the user to choose one to play. + radish play [STATION] + Begin playing STATION. If STATION is not + provided, play the most recently-played. + radish kill + Kill the currently-playing station. + radish add [STATION] + Add STATION or the currently-playing one + to the favorites list. + radish del [STATION] + Remove STATION or the currently-playing + one from the favorites list. + radish edit [STATION] + Edit the information of STATION, or the + current one if not given. + +See radish(1) for more details.") + (os.exit (or ?exit-code 0))) + +(fn main [...] + "Program entry point. +See `usage' for usage details." + (match [...] + [:help] (usage) + [:play ?station] (radish.play ?station) + [:kill] (radish.kill) + [:add ?station] (radish.add ?station) + [:del ?station] (radish.del ?station) + [:edit ?station] (radish.edit ?station) + [station] (radish.play ?station))) + +(main ...) + -- cgit 1.4.1-21-gabe81