Foliate: Read e-books in style, navigate with ease
johnfactotum.github.io
johnfactotum.github.io
> Add bookmarks and annotations. Reading progress, bookmarks, and annotations are stored in plain JSON files, so you can export or sync them easily with any tool or storage service.
> The data for each book is stored in a JSON file named after the book's identifier.
> How are identifiers generated? For formats or books without unique identifiers, Foliate will generate one with the prefix foliate:, plus the MD5 hash of the file.
Finally, someone recognized the benefit of using file hashes for ID purposes and my PDFs no longer get modified when I annotate them!
Now I just wish music playlists used hashes, too…
The file is not modified.
(This also means hashing the contents wouldn't work.)
I've thought through the problem of fingerprinting records (as in, any recorded data: text, images, audio, video, software, etc.) in a way that coherently identifies it despite changes over time. Git and related revision control systems probably offer one useful model. Another is to generate signatures via ngrams of the text in such a way that's resilient (i.e., non-brittle) despite varioius changes: different fonts, charactersets, slight variances in spelling (e.g., British vs. American English, transliterations between languages), omissions or additions, or other changes. Different versions of the same underlying work, e.g., PDF, HTML, or ASCII text, translations, different editions, etc., all have much in common, though in ways that a naive file hash wouldn't immediately recognise or reveal.
We often refer to works through tuples such as author-title-pubdate, or editor-language-title. This is a minute fraction of the actual content of most works, but is remarkably effective in creating namespaces. Controlled vocabularies and specific indexing systems (Dewey Decimal, OCLC, Library of Congress Catalog Number, ISBN, DOI, etc.) all refine this further, but require specific authority and expertise. I'd like to see an approach which both leverages and extends such classifications.
I can open PDFs on every OS I've ever used. Like, just open the file, find a PDF file in some directory and open that PDF file and see a render of the PDF.
I've never found anything that can do the same for ebooks without also trying to manage my "library". Like, if I just want to peek at a random epub file it will add it to my "bookshelf" automatically and makes that a very prominent part of the program.
Can I use this to just open an epub file?
“Sioyek is a PDF viewer with a focus on technical books and research papers”
I do have need of a library, but there's not much point for me if it's just one or two types of document. I've just moved to the new Zotero 7 beta, which has epub support, has always managed PDFs and web snapshots, and since Zotero 6 has supported rich annotation.
Perfect setup for me. One library containing all my notes, citations and reading.
I tried creating a reader (macos) based on mupdf (koreader also used it) and it’s definitely possible to have an epub viewer. I also dislike bookshelf type software if they try to manage the files as well (a simple database can be fine). So far. I just use these to check the epub file and do the reading on the kobo instead (or convert to pdf if I want annotations (ipad)).
set database "null"
set adjust-open "width"
set scroll-wrap false
set font "monospace light 24"
set statusbar-home-tilde true
set window-title-home-tilde true
set window-title-page true
set guioptions "v"
map [fullscreen] <PageDown> scroll full-down
map [fullscreen] <PageUp> scroll full-up
map [normal] <PageDown> scroll full-down
map [normal] <PageUp> scroll full-up
The font option just seems to cover the interface font (which is tiny if you don't set it) and guioptions "v" means no default status bar but always a vertical scroll bar. Page up and down use viewable pages instead of the default document page.I was also just looking for an epub reader due to this Humble book bundle on game design that mostly only has epub:
https://www.humblebundle.com/books/all-about-gaming-mit-pres...
There is a library view in the app but it is mostly a history of recently accessed files.
It comes with an app called ebook-viewer that doesn't do anything except view ebooks. It doesn't automatically add it to the calibre library management.
JFC, that's not how the installation and the first run of Calibre works at all. I'd write "I'am not sure why you think people would think calibre is first a manager library and not a book reader after installing it" but I'd be lying.
I've used https://www.kavitareader.com/ but it's not perfect either, this space could be "disrupted" by a Plex like product with opensource + licensed offerings but the target market is pretty small I think.
I'm not sure what the container is for...
Can someone please tell me the diskspace requirement for Foliate?
However, it needs flatpak runtime. If you already have different flatpak apps, this is not an issue, it is going to be shared with them, but if this is going to be your first-and-only flatpak app, you need to add few hundreds MB.
I'm pretty sure I already have flatpak, and enough space to run both Calibre and Foliate to compare them.
I use Calibre to manage my collection, create book covers if I need to for non-boo k documents, web for organising and occasional looking up of things, and eReader for reading.
Calibre was the very first thing I tried but it seems like it was going to be a time sink. I can't quantify that precisely maybe because of the design? I didn't seem like I could just get going easily.
Foliate was the next thing I tried and seemed perfect. Easy to start, limited options, good design. It was a lot closer to what I was used to on my mac.
I'm sure Calibre probably does a bunch of things perfectly and I should revisit it, but that's the experience coming from a novice.
https://github.com/project-kiosk/kiosk/tree/v3
I'm still deep in the trenches, though. That project is like my personal zen garden of deadline-free software development, so don't expect a release soon. Happy if someone would be interested in contributing, though :)
That was originally a PDF reader, but it has been working for some time also with epub files.
It renders the pages not only very fast, but also better than any other epub reader that I have tried (all the others seem to make worse choices about the relative sizes of various page elements).
I can't do that, on windows, or linux. I loved the experience that evince on ubuntu gave me for comics/manga some years ago (what I want: continuous pages, no menu or scrollbar visible, centered, fixed width, variable width, scrollbar on edge hover to show progress), and nothing that I've tried comes remotely close.
I was able to come close with HTML + CSS so I am partially content.
- - -
A recent big failure of mine is to find a music player on F-Droid, to listen to albums, that
- is capable to play a song,
- is capable to seek in the song
- doesn't need access to every media file ever on my phone, only the actual file (either by popping up the file chooser, or the file is opened from an another program)
I've checked at least 15 of them, and I think it is possible. I've found multiple examples that can do two (video players that don't need access to every file, can go forward/backward but refuse to play songs, also music players that don't need access to every media file, but can't jump to a position). I eventually had to give up on this one.Steps:
0. Uninstall VLC (I just did this to reset its permissions+config)
1. Install VLC (3.5.4 from fdroid)
2. Open VLC
3. It'll start with a splash screen, click next.
4. Next screen is VLC asking what permissions you want to give it. Pick the leftmost of the 3
5. Finish the setup wizard
6. It prompts for notification permission, which I allowed
7. You should be at a screen titled "Permission not granted", with 2 buttons. Click the right button to pick a file
8. Use the system file dialog to pick a file
9. It plays
I've recently written an article about the dangers of ebooks. Maybe it's of interest to some: https://gebir.ge/blog/every-trick-in-the-book/
I just wanted to chime in to say the Foliate code is really beautifully written too.
I was able to hack together an epub audiobook reader by running a custom version of foliatejs in Microsoft Edge (which has an amazing and free text to speech engine called "read aloud"). It's VERT hacky but you can try it here: https://nathansherburn.github.io/foliate-js/
Works on mobile and desktop Edge.
There’s only one kind of book I read on my laptop now- programming books PDFs. To code side by side. That's all. And PDF is better for rendering equations, graphs, code with syntax highlighting, and figures.
I use EPUB for "flat" essays, novels, storybooks, poems, etc. i.e. non-text/non-technical stuff.
And I use my Kindle or my tab always for that.
For the once or twice need of opening EPUBs on my laptop, I just use Okular.
Won't install something via Snap/Flat or compile it for that one-off kinds of use.
The device itself is pleasant enough
But I should have guessed, the experience for managing any content bought/downloaded from outside Amazon is almost unusable
Not at all.
I buy EPUBs from all kinds of vendors, across multiple languages. I also have many downloaded from Standard Ebooks [0].
All EPUB works fine, and provides great experience- as long as a file does not contain one of the following- custom page illustrations, syntax highlighted code, graphs, charts, maps, math equations, color comicstrip etc.
Just use PDF in tablet or laptop for arxiv papers, math/programming books, etc.
Use Kindle for recreational reading- like novels, poetry, essays, etc. I am a huge fan of reading since basically learning to read. And I love Kindle! Am a user for last ~10 years.
and it's possible to load PDFs on there
my complaint is that the tools for organising and managing the library are crap
But that is how it manages to hold its charge for a full month!
Koodo is the way to go
However, more recently I have been using "Koodo" reader and library for both epub and pdf
It has a great visual library too. I only use Koodo now.
(This is not a flaw in the software, this is a flaw in me: I don't know how to read -- I'm assuming it's Mandarin Chinese, but I can't even reliably tell that.)
No.
Koodo is now what I use, it renders the best for me, I feel like I'm reading a paper book, which is great to me, the fonts and theme are great.
Calibre's epub reader is painfully slow to start, and it does not look that good either.
I wish other epub readers can have better fonts and color.
I'm really not confortable with projects that treat the Git history as junk, to the point I'd rather avoid that software. I daily use the e-reader Koreader, and sometimes Plato, and their source code and Git history are clear and documented (though I think Koreader's choice of Lua is poorly suited to the task). I could patch Koreader to my taste and send pull requests.
I’ve come to appreciate it as some sort of outsider art anti-design, defiantly refusing to follow any notion of design consistency and aesthetics. But still, a nicely designed version would be amazing.
Thats the few stuff I used regularly.
Although it’s a website, books and reading histories are saved in the browser’s local storage and it doesn’t track anything.
Here’s the link: https://www.minimalreader.xyz
It seems to be quite picky about which books it accepts sometimes, will have to look into that :)
- enforces two page layout. I don't see how to fix it. advice does not fix it: https://github.com/johnfactotum/foliate/discussions/1166
- can't open all pdf that other viewers can.
- zoom does not work, settings do nothing.
Result of the 'style' is smudge view you can't fix.
EDIT: Spelling errors.
One nit regarding website, toggling dark mode causes a video change that has some ugly flashing, I think you could improve this by recording the video without dropshadow and adding the shadow with CSS.
Thanks for your suggestion, I'll consider it. But what do you mean by ugly flashing? Is it the instant background change that turn you off?
Also, there's a problem with responsive text reflow on your personal site, I've only noticed because I'm using a tiling wm.
I've made videos to showcase
I think for the first issue, with the flashing, it seems to flash to you, but it's just the theme being changed to light, isn't it? Or you are specifically only talking about the way the video container doesn't fit the rest of the page while it's loading?
Regarding the second issue, good catch! I'll fix that. Thanks!
I'll try to see what I can do about it to make the transition easier on the eyes, so thanks for the feedback.
thanks, this is quite useful for my macos.
alias foliate='WEBKIT_DISABLE_DMABUF_RENDERER=1 foliate'
This is because they are in webp format.
I have support for this format disabled in browser, because I know of no simple native viewer on Linux, so I in effect cannot save such images, because I cannot view them.
The only disadvantage is that the browsers are slower and they have much more inconvenient user interfaces than the dedicated image viewers, for functions like zoom and pan or passing to the next or previous image in a directory.
An alternative is to use the movie player "mpv" as the native webp viewer. This is much faster and it has the advantage of easy navigation in a directory with webp images and of easy zoom and pan (you may need to edit the mpv configuration and bind the ZOOMIN and ZOOMOUT commands to whatever keys you prefer).
Is this a feature of the app? Can I bundle an ebook with my own hyphenations and ensure that only those hyphenations will appear when Foliate displays the ebook?
Kindles have incredibly awful hyphenation. It seems to originate from somebody confusing the algorithm for hyphenation -- which is "there's a big list of hyphenation points for every word in existence, and when you want to hyphenate a word, you look it up in the list and choose the best available hyphenation point" -- with the algorithm for compressing the master hyphenation list, which involves representing the list as a priority-ordered set of rules for where a hyphen should appear based on a few surrounding letters.
But the result is that Kindles are constantly trying to hyphenate words based on a compressed list of words that doesn't include the word that needs to be hyphenated, with results like "Q-ingjiao".
This could be easily solved by checking every ebook for words that don't appear in the master list, and bundling a custom list of just those words with every book, falling back to the master list in the common case where a word that needs to be hyphenated isn't present in the custom list. But I guess nobody cares.
the only app that works fine with chromebook is its own gallery viewer, but has no bookmarks no annotations
in android theres only xodo which is paid and proprietary
But it no option menu and no obvious way to turn pages without using the table of contents tool. It didn't respond intuitively to mouse clicks or touch gestures attempts to turn the pages. I will try it some more later, but it doesn't follow hardware ereader (tap to turn page) or normal desktop (no visible buttons or click/drag) UI conventions.
[0] https://f-droid.org/packages/com.foobnix.pro.pdf.reader/