tPCL: Home
tPCL: Ebook Formats
---
Gpub is similar to epub, at least superficially. Both are zip archives housing markup and metadata. However, a gpub does not contain CSS, OPF, (X)HTML, or XML (like epub). Instead, it uses gemtext and leaves display up to the ereading software/hardware.
Gpubs usually have the file extension: `.gpub`. They support having a cover cover image, metadata, interior images, and text marked up with gemtext. They support all regular gemtext items, and there are some conventions around a few specific extensions that suit books (even if they did not suit gemini as a protocol).
Gempub files are often smaller than a comparable epub, but not too much smaller, given the bulk of the book is the textual content in each case. Gemtext as a markup language is lighter weight than (X)HTML. What gempub doesn't always achieve in size, it definitely achieves in simplicity. Almost anyone that knows how to use a computer has the tools at hand to make their own gpub ebooks, or to pick apart existing ones.
Documentation
The original specification was produced some years ago, and has not seen any updates or changes in that time. As such, I have done a soft-fork of the format (I would be happy to collaborate and work toward a singular vision if the original authors reached out and wanted that). My fork is fully backwards compatible, but makes some edge cases more clear and updates the language around the whole specification.
The foked specification (v1.0.1)
Gempub Specification v1.0.1
Lot's of gpub info on this website (including the various specifications)
The original specification (v1.0.0)
Gempub Specification v1.0.0 (Summarized by Sloum)
Original Specification
Other Documentation
I run a website about gpubs that has a web based reader, specifications, links to software, etc.
https://gpub.colorfield.space
It has a good chunk of the gpub info in this capsule, plus a bit more.
Sources
At present I do not believe there are commercial outlets producing gpub files. This capsule hosts some:
Nature Writing (in gpub format)
Various auto-converted files can be found around geminispace. Use your favorite search engine to search for `gpub` and you will likely find some. If you start producing any at volume, or publish books in them: get in touch, we'll add you here.
There are a number of readers, editing tools, converters, etc. out there for the gpub format (especially converters—low hanging fruit). Here I list the ones I know of (a number of them are my own).
To my knowledge, there are no hardware ereading systems that directly support gpub. I would love to see KO Reader, or something like it, add gpub support. I may look into doing a PR to add support.
Gpub Readers
As stated above, no hardware specific (Kindle, Kobo, Boox, etc.) gpub readers are available at time of writing. However, there are a number of GUI and TUI (terminal/text user interface) options.
GUI
GReader - Simple GUI gpub reader
Lagrange - Gemini client with gpub support
gpub-reader - An offline web-browser-based gpub reader
TUI
gpr - A featureful TUI gpub reader (also supports epub)
Precompiled Downloads
Don't feel like building software? We host precompiled binaries for a few platforms for most of the above (except lagrange, but we link to their releases page). You can download the programs without ever leaving the comfort of gemini...
Gpub Software (Precompiled Binaries)
Most of this will fall into a few camps:
- Converters to/from gpub
- Toolkits for building gpub files
- Formatters
At a simple level, to make a gpub file you need the ability to create a zip archive (most file browsers can now do this very simply) and you need files. That is it. So the toolkits are often for more complex work. The converters are for any work already in a different format, though all of them (my own included) have shortcomings. Since gemtext is not as expressive as HTML, converting from epub can often lose things in the shuffle, where hand editing might find better ways of expressing them. There are pros and cons to both approaches.
gpb - gpub builder; a cli toolkit for building gpubs (includes project gutenberg import)
epub-to-md - convert from epub to gpub