summary refs log tree commit diff stats
path: root/cmd/cetus/main.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-23 13:32:16 +0530
committerAndinus <andinus@nand.sh>2020-03-23 13:32:16 +0530
commita6b03fa4bb89a8f0c3546f720d5b35178c29f499 (patch)
treea0092511e85360e9a11578e530ccd751cee124ec /cmd/cetus/main.go
parent929e30adced38ac82f4482aa8c0c813e6fa2471b (diff)
downloadcetus-a6b03fa4bb89a8f0c3546f720d5b35178c29f499.tar.gz
Add notify functionality to cetus
Diffstat (limited to 'cmd/cetus/main.go')
-rw-r--r--cmd/cetus/main.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/cetus/main.go b/cmd/cetus/main.go
index b039f7a..0ff6b44 100644
--- a/cmd/cetus/main.go
+++ b/cmd/cetus/main.go
@@ -22,6 +22,9 @@ var (
 	bpodPathOnly *bool
 	bpodQuiet    *bool
 	bpodDump     *bool
+
+	apodNotify *bool
+	bpodNotify *bool
 )
 
 func main() {
@@ -52,6 +55,8 @@ func main() {
 	rand.Seed(time.Now().Unix())
 
 	apodCmd := flag.NewFlagSet("apod", flag.ExitOnError)
+	bpodCmd := flag.NewFlagSet("bpod", flag.ExitOnError)
+
 	defDate := time.Now().UTC().Format("2006-01-02")
 
 	// Flags to parse for apod service.
@@ -62,8 +67,7 @@ func main() {
 	apodPathOnly = apodCmd.Bool("path-only", false, "Print only the path")
 	apodQuiet = apodCmd.Bool("quiet", false, "Stay quiet")
 	apodDump = apodCmd.Bool("dump", false, "Dump received response")
-
-	bpodCmd := flag.NewFlagSet("bpod", flag.ExitOnError)
+	apodNotify = apodCmd.Bool("notify", false, "Send a desktop notification with background information")
 
 	// Flags to parse for bpod service.
 	bpodAPI = bpodCmd.String("api", "https://www.bing.com/HPImageArchive.aspx", "BPOD API")
@@ -71,6 +75,7 @@ func main() {
 	bpodPathOnly = bpodCmd.Bool("path-only", false, "Print only the path")
 	bpodQuiet = bpodCmd.Bool("quiet", false, "Stay quiet")
 	bpodDump = bpodCmd.Bool("dump", false, "Dump received response")
+	bpodNotify = bpodCmd.Bool("notify", false, "Send a desktop notification with background information")
 
 	// Switching on commands will cause more repetition than
 	// switching on service. If we switch on commands then switch