|d69e555e4b||3 months ago|
|images||3 months ago|
|termios||3 months ago|
|.gitignore||3 months ago|
|LICENSE||3 months ago|
|Makefile||3 months ago|
|README.md||3 months ago|
|go.mod||3 months ago|
|go.sum||3 months ago|
|gpub.go||3 months ago|
|main.go||3 months ago|
|metadata.go||3 months ago|
|net.go||3 months ago|
|open.go||3 months ago|
|open_darwin.go||3 months ago|
|zip.go||3 months ago|
A basic gempub reader for the terminal. It is a reader/client for
gpub files, though they do not have to have that file extension... just the correct metadata and file structure.
The help output of gpr is as follows:
Usage: gpr [option]... [gpub-file] When run with no options and no file gpr will attempt to resume reading the last book that was opened where it was left off. When run with a path to a gpub file gpr will attempt to resume from where reading left off last for that file, or the beginning if the file has not been read previously. When run with a URL to a remote gpub file gpr will attempt to download the file to $GPR_LIBRARY, if it is set, or ~/.local/share/gpr, if it is not set. The book will then be opened for reading if it is a valid gpub. Options: -h Print help text -d Output a book's description (for human reading) -fancy Use escape sequences to render headings, bold, and italics -indent Indent the beginning of paragraphs -meta Output a book's metadata (for processing)
||Turn to the next page, moving to the next chapter if need be|
||Turn to the previous page, moving to the last page in the previous chapter if need be|
||Jump to the start of the next chapter|
||Jump to the start of the previous chapter|
||Quit the program (autosaving your place in the book)|
||Open/Close the Table of Contents|
||Enter a number; used for entering a ToC entry or a link number that you wish to follow|
||Erase the last number in the number input buffer|
||Submit the number that has been entered to follow the link corresponding to that number (closing the ToC if it is open)|
|Any Key||Re-render the screen, in particular after a terminal size change. Note: any key pressed will still have its normal function as well|
- Images (including the cover). Since it is a terminal application and most terminals do not support images I am not attempting to add it as a feature.
- The Windows operating system: I do not have it, do not use it, and do not know it. If you would like to port this software to windows: please do! I just don't have a machine to test with and am generally uninterested in the platform.
Building gpr from source should be relatively painless... if you have a compiler for golang. If you do, and it is not ancient, a simple
go build from within the folder will do the job. Alternatively,
make will build. At which point you can run the program
./gpr -h or
sudo make install to move it to
/usr/local/bin. Note that the Makefile removes some debugging tables and headers that result in a smaller file size than
go build will produce by default.
The point of this reader is to be able to read novels (often converted from epub). The gpub format is smaller and simpler than epub. I am hoping that by building the reader (as well as an epub to gpub converter) more people may start using the gpub format for novels and other prose styles suitable to the format. It is not a core goal of the reader to specifically support capsule archives or other written forms other than fiction writing... but it likely will handle them relatively ok. The gpub format is well suited to journaling, but I think it is also well suited to fiction writing (novels, short story collections, etc), and that it could be a much simpler alternaitve to epub/azw3/etc, giving writers the power to control their works without needing to be software developers. With the sole shortcoming, for me, being the lack of inline italics/em and bold/strong in gemtext. I support their markdown syntax in this reader, which is a break from the gemtext specification that I hope does not start up in gemtext in general and fragment things as I do not think the change would be appropriate for gemini/gemtext in general, just for the gempub book format.
Who doesn't like a screenshot in a repo?