A Gemini capsule directory zipped up would make an excellent eBook format. .ePub is just zipped up xHtml and is an absolute nightmare to parse.

@oppen I think gemtext doesn't have enough markup for books. It can work, but the current xhtml use allow many inlines markup which are often important.

@solene @oppen For a novel, gemtext would be OK. For a textbook with footnotes, crossed references, etc, it would not be so good.

@bortzmeyer @solene obviously, but even Google with their limitless resources can't parse xHtml reliably in Play Books.

@oppen agree with you.
I think #gemini format can be used also for a wiki and also zipped (or tar.gz) as Zim does with other wikis

@adele I might write a spec and give it a go. I already have an in-progress .ePub reader so could add this new nascent format too.

@oppen I don't know if it is easier to get one file from a zip file instead of a tar.gz which need maybe to extract all archive to get a file among whole ??
It would explain that many file formats use zip compression (.jar, .odt, .ods...) to strore multiple sub-files

@eris @oppen also, image support may be an issue. Most of literature I need has images.

@oppen thanks for the idea! now i want to whip something like that up. is zip neccessarily the best for this? perhaps something better at plaintext compression?

@eris yeah, zip's standard for this kinda thing. Java .jar, Android .apk, .epub all use zip as a container

@eris I'll be putting a spec together over the next week if you want to help. Check the epub format for inspiration, leverage Gemtext for pretty much everything with the addition of a metadata file that may define a cover image and other stuff. Chapters should just sit in a single .gmi file that's split by the reader into screen size chunks.

@oppen sounds good! ill try write one in shell :p

@oppen Oh, looks cool.

I just wish .gmi had italics since I use them so often.

@oppen Will be very happy to contribute to this in any way I can.

Maybe I will write a little reader in C for the cli once you get things fully formalized.

@oppen I'm working on ZIP archive support in Lagrange, so I gave this a try. 😊

My UI could use some navigation assistance (next/prev chapter) but it works pretty nicely as-is.

My experimental .gpubs:

@oppen Quick and shoddy. :)

Is it a valid use case to zip up a static capsule (like my "skyjake's_capsule.gpub") and expect it to work?

Lagrange's ZIP archive viewer automatically looks for index.gmi in any directory, and relative URLs are resolved like on normal Gemini pages. That seems to be all that's needed to make it work.

Also, would be nice to allow any type of file to be included inside the .gpub? Client can always handle unknown formats via external apps.

@jk yeah, that sounds like a sane fallback. I'll add a note.

@jk what I'll do is add an optional value that specifies the start index.gmi, in the absence of that implementations would use the first index.gmi they come across. Will also lose the capsule/ dir requirement, it was cute, but unnecessary.

@oppen 👍 Yeah capsule/ can go...

It might be wise to avoid undefined behavior by requiring that if there isn't an /index.gmi, then the metadata must say which file to use as the index page.

@oppen fine
You should have distinct keyword for language and charset

language: en or en-UK
charset: iso-8859-1 or UTF-8

@adele I'll get that in, optional with UTF-8 default I think.

@oppen , yes default to UTF-8 is a good idea.

About I've written, I don't know if en-UK is really a language, it's a locale. Maybe an "en" is enough ??
Thinking about virtual gpub libraries, a standardized language code is very well. You should specify to use an ISO 639-1 code for language

@adele yes, that's in already: 639-1 or 639-2 as they can coexist nicely

@oppen oh, sorry, I'm stupid... when I saw ISO-639 in your specs, I thought it was a charset (many start with iso-...)
That's why I asked you to separate language and charset 😢 I hate me when I do this kind of things

@oppen I like the idea... mostly because existing gemini clients don't keep track of scroll position in their bookmarks. Funny to see this pop up before any submissions to

Also, does "gpubVersion: 1.0.0" open the door too much to future extensibility? (Maybe inline notes using .patch files?)

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.