From b74126b9b05a69e34be5843c7c335ec387d4037b Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Wed, 15 Oct 2025 14:43:34 +0200 Subject: [PATCH] add readme, show help w/o args --- README.md | 27 +++++++++++++++++++++++++++ cmd/config.go | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..425fb61 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# epuppy - terminal epub reader + +This is a little TUI epub ebook reader. This is a work in progress and +may not work for all EPUB files yet. It uses a modified version of the +[epub module](https://github.com/kapmahc/epub/), which seems to be +unmaintained but the best I could find to parse EPUBs. Find it in the +`pkg/epub/` directory. + +## Installation + +### Installation from source + +Check out the repository and execute `go build`, then copy the +compiled binary to your `$PATH`. + +# Report bugs + +[Please open an issue](https://github.com/TLINDEN/gfn/issues). Thanks! + +# License + +This work is licensed under the terms of the General Public Licens +version 3. + +# Author + +Copyleft (c) 2024 Thomas von Dein diff --git a/cmd/config.go b/cmd/config.go index b0e53a9..113818d 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -99,6 +99,9 @@ func InitConfig(output io.Writer) (*Config, error) { // arg is the epub file if len(flagset.Args()) > 0 { conf.Document = flagset.Args()[0] + } else { + flagset.Usage() + os.Exit(1) } if conf.Debug {