--- /dev/null
+Copyright (c) 2023-present Izuru Yakumo <yakumo.izuru@chaotic.ninja>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- /dev/null
+PREFIX ?= /usr/local
+GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -buildmode=exe
+
+VERSION ?= `git describe --abbrev=0 --tags || echo $VERSION`
+COMMIT ?= `git rev-parse --short HEAD || echo $COMMIT`
+BUILD ?= `git show -s --pretty=format:%cI`
+
+all: yuuka
+
+yuuka:
+ go build ${GOFLAGS}
+ @strip -s yuuka
+clean:
+ rm -f yuuka
+install:
+ install -Dm0755 yuuka ${DESTDIR}${PREFIX}/bin/yuuka
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/yuuka
+
--- /dev/null
+# yuuka
+It's a [wttr](https://wttr.in) client, named after [Yuuka Kazami](https://en.touhouwiki.net/wiki/Yuuka_Kazami) from [Touhou 4: Lotus Land Story](https://en.touhouwiki.net/wiki/Lotus_Land_Story)
--- /dev/null
+// Package yuuka is yet another client for wttr.in
+// Homepage: https://suzunaan.chaotic.ninja/yuuka/
+package main
--- /dev/null
+module marisa.chaotic.ninja/yuuka
+
+go 1.20
+
+require github.com/integrii/flaggy v1.5.2
--- /dev/null
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/integrii/flaggy v1.5.2 h1:bWV20MQEngo4hWhno3i5Z9ISPxLPKj9NOGNwTWb/8IQ=
+github.com/integrii/flaggy v1.5.2/go.mod h1:dO13u7SYuhk910nayCJ+s1DeAAGC1THCMj1uSFmwtQ8=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "log"
+
+ "github.com/integrii/flaggy"
+)
+var (
+ format string = "AT"
+ region string
+ lang string = "en"
+)
+func main() {
+ flaggy.SetDescription("Yuuka is yet another client for wttr.in")
+ flaggy.SetVersion(FullVersion())
+
+ forecastCmd := flaggy.NewSubcommand("forecast")
+ forecastCmd.String(&format, "f", "format", "View options")
+ forecastCmd.String(®ion, "r", "region", "Where to look at")
+ forecastCmd.String(&lang, "l", "language", "Set preferred language")
+ forecastCmd.Description = "Check the current forecast of an specific location"
+
+ moonCmd := flaggy.NewSubcommand("moon")
+ moonCmd.String(&format, "f", "format", "View options")
+ moodCmd.String(&lang, "l", "language", "Set preferred language")
+ moonCmd.Description = "See what's going on at the Moon"
+
+ flaggy.AttachSubcommand(forecastCmd, 1)
+ flaggy.AttachSubcommand(moonCmd, 1)
+
+ flaggy.Parse()
+
+ if forecastCmd.Used {
+ ShowForecast(region, format, lang)
+ } else if moonCmd.Used {
+ ShowMoonPhases(format, lang)
+ } else {
+ flaggy.ShowHelpAndExit("A subcommand is required")
+ }
+}
+func sanityCheck(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Prints the current forecast for a region in standard output
+// Required arguments: region
+// Optional arguments: format
+func ShowForecast(region string, format string, lang string) {
+ query := "https://wttr.in/" + region + "?" + format + "&lang" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s", body)
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Print the current phase of the Moon in standard output
+// Optional arguments: format
+func ShowMoonPhases(format string, lang string) {
+ query := "https://wttr.in/" + "moon" + "?" + format + "&lang=" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s\n", body)
+}
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "fmt"
+)
+
+var (
+ // Version release version
+ Version = "0.0.1"
+
+ // Commit will be overwritten automatically by the build system
+ Commit = "HEAD"
+)
+
+// FullVersion display the full version and build
+func FullVersion() string {
+ return fmt.Sprintf("%s@%s", Version, Commit)
+}
--- /dev/null
+Copyright (c) 2023-present Izuru Yakumo <yakumo.izuru@chaotic.ninja>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- /dev/null
+PREFIX ?= /usr/local
+GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -buildmode=exe
+
+VERSION ?= `git describe --abbrev=0 --tags || echo $VERSION`
+COMMIT ?= `git rev-parse --short HEAD || echo $COMMIT`
+BUILD ?= `git show -s --pretty=format:%cI`
+
+all: yuuka
+
+yuuka:
+ go build ${GOFLAGS}
+ @strip -s yuuka
+clean:
+ rm -f yuuka
+install:
+ install -Dm0755 yuuka ${DESTDIR}${PREFIX}/bin/yuuka
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/yuuka
+
--- /dev/null
+# yuuka
+It's a [wttr](https://wttr.in) client, named after [Yuuka Kazami](https://en.touhouwiki.net/wiki/Yuuka_Kazami) from [Touhou 4: Lotus Land Story](https://en.touhouwiki.net/wiki/Lotus_Land_Story)
--- /dev/null
+// Package yuuka is yet another client for wttr.in
+// Homepage: https://suzunaan.chaotic.ninja/yuuka/
+package main
--- /dev/null
+module marisa.chaotic.ninja/yuuka
+
+go 1.20
+
+require github.com/integrii/flaggy v1.5.2
--- /dev/null
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/integrii/flaggy v1.5.2 h1:bWV20MQEngo4hWhno3i5Z9ISPxLPKj9NOGNwTWb/8IQ=
+github.com/integrii/flaggy v1.5.2/go.mod h1:dO13u7SYuhk910nayCJ+s1DeAAGC1THCMj1uSFmwtQ8=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "log"
+
+ "github.com/integrii/flaggy"
+)
+var (
+ format string = "AT"
+ region string
+ lang string = "en"
+)
+func main() {
+ flaggy.SetDescription("Yuuka is yet another client for wttr.in")
+ flaggy.SetVersion(FullVersion())
+
+ forecastCmd := flaggy.NewSubcommand("forecast")
+ forecastCmd.String(&format, "f", "format", "View options")
+ forecastCmd.String(®ion, "r", "region", "Where to look at")
+ forecastCmd.String(&lang, "l", "language", "Set preferred language")
+ forecastCmd.Description = "Check the current forecast of an specific location"
+
+ moonCmd := flaggy.NewSubcommand("moon")
+ moonCmd.String(&format, "f", "format", "View options")
+ moodCmd.String(&lang, "l", "language", "Set preferred language")
+ moonCmd.Description = "See what's going on at the Moon"
+
+ flaggy.AttachSubcommand(forecastCmd, 1)
+ flaggy.AttachSubcommand(moonCmd, 1)
+
+ flaggy.Parse()
+
+ if forecastCmd.Used {
+ ShowForecast(region, format, lang)
+ } else if moonCmd.Used {
+ ShowMoonPhases(format, lang)
+ } else {
+ flaggy.ShowHelpAndExit("A subcommand is required")
+ }
+}
+func sanityCheck(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Prints the current forecast for a region in standard output
+// Required arguments: region
+// Optional arguments: format
+func ShowForecast(region string, format string, lang string) {
+ query := "https://wttr.in/" + region + "?" + format + "&lang" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s", body)
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Print the current phase of the Moon in standard output
+// Optional arguments: format
+func ShowMoonPhases(format string, lang string) {
+ query := "https://wttr.in/" + "moon" + "?" + format + "&lang=" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s\n", body)
+}
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "fmt"
+)
+
+var (
+ // Version release version
+ Version = "0.0.1"
+
+ // Commit will be overwritten automatically by the build system
+ Commit = "HEAD"
+)
+
+// FullVersion display the full version and build
+func FullVersion() string {
+ return fmt.Sprintf("%s@%s", Version, Commit)
+}
--- /dev/null
+Copyright (c) 2023-present Izuru Yakumo <yakumo.izuru@chaotic.ninja>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- /dev/null
+PREFIX ?= /usr/local
+GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -buildmode=exe
+
+VERSION ?= `git describe --abbrev=0 --tags || echo $VERSION`
+COMMIT ?= `git rev-parse --short HEAD || echo $COMMIT`
+BUILD ?= `git show -s --pretty=format:%cI`
+
+all: yuuka
+
+yuuka:
+ go build ${GOFLAGS}
+ @strip -s yuuka
+clean:
+ rm -f yuuka
+install:
+ install -Dm0755 yuuka ${DESTDIR}${PREFIX}/bin/yuuka
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/yuuka
+
--- /dev/null
+# yuuka
+It's a [wttr](https://wttr.in) client, named after [Yuuka Kazami](https://en.touhouwiki.net/wiki/Yuuka_Kazami) from [Touhou 4: Lotus Land Story](https://en.touhouwiki.net/wiki/Lotus_Land_Story)
--- /dev/null
+// Package yuuka is yet another client for wttr.in
+// Homepage: https://suzunaan.chaotic.ninja/yuuka/
+package main
--- /dev/null
+module marisa.chaotic.ninja/yuuka
+
+go 1.20
+
+require github.com/integrii/flaggy v1.5.2
--- /dev/null
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/integrii/flaggy v1.5.2 h1:bWV20MQEngo4hWhno3i5Z9ISPxLPKj9NOGNwTWb/8IQ=
+github.com/integrii/flaggy v1.5.2/go.mod h1:dO13u7SYuhk910nayCJ+s1DeAAGC1THCMj1uSFmwtQ8=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "log"
+
+ "github.com/integrii/flaggy"
+)
+var (
+ format string = "AT"
+ region string
+ lang string = "en"
+)
+func main() {
+ flaggy.SetDescription("Yuuka is yet another client for wttr.in")
+ flaggy.SetVersion(FullVersion())
+
+ forecastCmd := flaggy.NewSubcommand("forecast")
+ forecastCmd.String(&format, "f", "format", "View options")
+ forecastCmd.String(®ion, "r", "region", "Where to look at")
+ forecastCmd.String(&lang, "l", "language", "Set preferred language")
+ forecastCmd.Description = "Check the current forecast of an specific location"
+
+ moonCmd := flaggy.NewSubcommand("moon")
+ moonCmd.String(&format, "f", "format", "View options")
+ moodCmd.String(&lang, "l", "language", "Set preferred language")
+ moonCmd.Description = "See what's going on at the Moon"
+
+ flaggy.AttachSubcommand(forecastCmd, 1)
+ flaggy.AttachSubcommand(moonCmd, 1)
+
+ flaggy.Parse()
+
+ if forecastCmd.Used {
+ ShowForecast(region, format, lang)
+ } else if moonCmd.Used {
+ ShowMoonPhases(format, lang)
+ } else {
+ flaggy.ShowHelpAndExit("A subcommand is required")
+ }
+}
+func sanityCheck(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Prints the current forecast for a region in standard output
+// Required arguments: region
+// Optional arguments: format
+func ShowForecast(region string, format string, lang string) {
+ query := "https://wttr.in/" + region + "?" + format + "&lang" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s", body)
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Print the current phase of the Moon in standard output
+// Optional arguments: format
+func ShowMoonPhases(format string, lang string) {
+ query := "https://wttr.in/" + "moon" + "?" + format + "&lang=" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s\n", body)
+}
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "fmt"
+)
+
+var (
+ // Version release version
+ Version = "0.0.1"
+
+ // Commit will be overwritten automatically by the build system
+ Commit = "HEAD"
+)
+
+// FullVersion display the full version and build
+func FullVersion() string {
+ return fmt.Sprintf("%s@%s", Version, Commit)
+}
--- /dev/null
+Copyright (c) 2023-present Izuru Yakumo <yakumo.izuru@chaotic.ninja>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--- /dev/null
+PREFIX ?= /usr/local
+GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -buildmode=exe
+
+VERSION ?= `git describe --abbrev=0 --tags || echo $VERSION`
+COMMIT ?= `git rev-parse --short HEAD || echo $COMMIT`
+BUILD ?= `git show -s --pretty=format:%cI`
+
+all: yuuka
+
+yuuka:
+ go build ${GOFLAGS}
+ @strip -s yuuka
+clean:
+ rm -f yuuka
+install:
+ install -Dm0755 yuuka ${DESTDIR}${PREFIX}/bin/yuuka
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/yuuka
+
--- /dev/null
+# yuuka
+It's a [wttr](https://wttr.in) client, named after [Yuuka Kazami](https://en.touhouwiki.net/wiki/Yuuka_Kazami) from [Touhou 4: Lotus Land Story](https://en.touhouwiki.net/wiki/Lotus_Land_Story)
--- /dev/null
+// Package yuuka is yet another client for wttr.in
+// Homepage: https://suzunaan.chaotic.ninja/yuuka/
+package main
--- /dev/null
+module marisa.chaotic.ninja/yuuka
+
+go 1.20
+
+require github.com/integrii/flaggy v1.5.2
--- /dev/null
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/integrii/flaggy v1.5.2 h1:bWV20MQEngo4hWhno3i5Z9ISPxLPKj9NOGNwTWb/8IQ=
+github.com/integrii/flaggy v1.5.2/go.mod h1:dO13u7SYuhk910nayCJ+s1DeAAGC1THCMj1uSFmwtQ8=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "log"
+
+ "github.com/integrii/flaggy"
+)
+var (
+ format string = "AT"
+ region string
+ lang string = "en"
+)
+func main() {
+ flaggy.SetDescription("Yuuka is yet another client for wttr.in")
+ flaggy.SetVersion(FullVersion())
+
+ forecastCmd := flaggy.NewSubcommand("forecast")
+ forecastCmd.String(&format, "f", "format", "View options")
+ forecastCmd.String(®ion, "r", "region", "Where to look at")
+ forecastCmd.String(&lang, "l", "language", "Set preferred language")
+ forecastCmd.Description = "Check the current forecast of an specific location"
+
+ moonCmd := flaggy.NewSubcommand("moon")
+ moonCmd.String(&format, "f", "format", "View options")
+ moodCmd.String(&lang, "l", "language", "Set preferred language")
+ moonCmd.Description = "See what's going on at the Moon"
+
+ flaggy.AttachSubcommand(forecastCmd, 1)
+ flaggy.AttachSubcommand(moonCmd, 1)
+
+ flaggy.Parse()
+
+ if forecastCmd.Used {
+ ShowForecast(region, format, lang)
+ } else if moonCmd.Used {
+ ShowMoonPhases(format, lang)
+ } else {
+ flaggy.ShowHelpAndExit("A subcommand is required")
+ }
+}
+func sanityCheck(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Prints the current forecast for a region in standard output
+// Required arguments: region
+// Optional arguments: format
+func ShowForecast(region string, format string, lang string) {
+ query := "https://wttr.in/" + region + "?" + format + "&lang" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s", body)
+}
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+)
+
+// Print the current phase of the Moon in standard output
+// Optional arguments: format
+func ShowMoonPhases(format string, lang string) {
+ query := "https://wttr.in/" + "moon" + "?" + format + "&lang=" + lang
+ resp, err := http.Get(query)
+ sanityCheck(err)
+ defer resp.Body.Close()
+ body, err := io.ReadAll(resp.Body)
+ sanityCheck(err)
+ fmt.Printf("%s\n", body)
+}
--- /dev/null
+// $TheSupernovaDuo: yuuka,v 0.1.1 2023/5/29 18:19:14 yakumo_izuru Exp $
+package main
+
+import (
+ "fmt"
+)
+
+var (
+ // Version release version
+ Version = "0.0.1"
+
+ // Commit will be overwritten automatically by the build system
+ Commit = "HEAD"
+)
+
+// FullVersion display the full version and build
+func FullVersion() string {
+ return fmt.Sprintf("%s@%s", Version, Commit)
+}