top | item 20390708

Foliate – A simple and modern GTK eBook viewer

299 points| lulouie | 6 years ago |github.com

112 comments

order

lulouie|6 years ago

I'm using Linux and trying to find a e-reader recently. Here is what I tested on Arch:

Calibre: Failed to open

Okular: Ugly, cannot modify margin

bookworm: No two-page view, only scrolling-mode, and scrolling-mode cannot get the reading progress

zathura: too simplify resulting in not know how to use

lector: cannot recognize epub......

Buka: cannot open the book. (I don't get the logic flow, create a list first, then import the book, then crash)

Until I found Foliate, it support two-page view w/ progress bar, it support epub will in different language (I test en_US and zh_TW), fast lookup (gtrans, Wiktionary, Wikipedia), good UI, ...etc

dmm|6 years ago

> Calibre: Failed to open

Perhaps this says more about Arch than it does Calibre.

michaelmrose|6 years ago

Regarding Zathura the most readily available resource can be found by running man zathura and man zathurarc. The same info is of course on the web.

It does 2 page view, optionally shows progress, and with the mupdf backend supports epub and pdf and a few more.

Now it doesn't support mobi but calibre can automatically create an epub from the mobi on import.

Calibre is still useful in 17 different ways even if you don't actually use it to read the book.

elagost|6 years ago

Running Arch as well and I use the Calibre Flatpak to manage my Kindle. I plug it in every month or so and haven't had any failures in the last year. I've found that Flatpaks solve the problem of some older programs not working well on Arch or some programs not getting updated on Debian.

afranchuk|6 years ago

I've never personally used it for epub, but apparently mupdf works with epub files. It's my go-to PDF viewer at least. Just be sure to read the man pages as most operations are keyboard hotkeys.

agumonkey|6 years ago

foliate seems a great thing, but

    /usr/bin/com.github.johnfactotum.Foliate


 .. come on

pastage|6 years ago

Fbreader is nice, I've only used Calibre for converting ebooks not sure you can read in it.

loeg|6 years ago

Calibre's ebook-viewer is tolerable when your distro doesn't break Qt5/Calibre; I think that's an Arch problem, unfortunately.

dsr_|6 years ago

The epubreader addon for Firefox is not perfect, but it is pretty good. It would be better if it would:

- reflow on window size change

- allow me to pick any system font to read in

ernst_klim|6 years ago

Impressive, you've tried so much e-readers except the right one: FBreader.

ayoisaiah|6 years ago

Bookworm definitely has a two-page view. I'm using it on Elementary OS

darkpuma|6 years ago

pandoc+emacs. I also use the read-aloud package, which all together makes the best ereader+TTS experience. (However I run the TTS over the lan on a mac, because FOSS text-to-speech is awful.)

unixhero|6 years ago

Well you forgot FB Reader

baybal2|6 years ago

Ever tried Evince?

JasonFruit|6 years ago

Ecosystems are tough. I'd never used meson, so I installed it using apt-get. I tried to build Foliate, and got an error about wrong arguments to `project()`. Searching for the error brought results about a wrong version, so I uninstalled meson and reinstalled it using pip. The installation completed fine. I went to run Foliate (com.github.johnfactotum.Foliate, if that wasn't somehow obvious), and I got an error from GJS (JS ERROR: SyntaxError: invalid property id @ resource:///com/github/johnfactotum/Foliate/js/main.js:57 JS_EvaluateScript() failed).

If it's obvious to anyone else what's wrong here, it's not obvious to me. Isn't one of the advantages of interpreting the code on the target platform supposed to be portability? If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave?

I'm sure this is a great project, and I mean no disrespect to the author, who did a better job of installation instructions than most — but I'm tired of installation being such a pain. It's almost, but not quite, enough to make a guy run Windows.

jancsika|6 years ago

> Searching for the error brought results about a wrong version

One of the bullet points from the Meson website:

> * fun!

So if I understand correctly, this modern build tool created to replace all the extant time-wasting build tools got memorialized in Debian in a half-baked state where it's not compatible with future versions.

Also-- the fact that you had to leave the hardened bank vault of apt through the screen door of pip... to install a thing to build other things to run on your system.

I love it.

> If so, why is it I so seldom can can get anything written for GJS, or Node, or a Python program not my own, to install and run without a three-hour yak shave?

... is the question that explains why Electron exists. Every comment on HN about its size, memory usage, and insecurity doubles as a critique of all the problems you just hit with a Linux system.

Electron: "Memory and disk space is cheap enough, but your time will never be."

z3t4|6 years ago

After cloning the project, all you should have to do is to ./src/main.js and the shebang should take care of the rest (running gjs, node, python etc).

Why complicate things? build-steps are the root of all evil.

navidr|6 years ago

Wow, I didn't see this coming. I always had this problem in Linux to the point I am going to ditch Linux for windows the moment wsl2 becomes stable. But this app is literally awesome. I wish Gnome foundation would stop acting stupid as hell and start funding projet like this and make it official Gnome project.

Thank you so much.

phkahler|6 years ago

I think the problem is that funding probably comes from Redhat and/or FSF. One of those is interested in business uses and the other doesn't have a lot of money.

I'm starting to think everyone who can write code should try to contribute what effort they can to an open source project. I'm starting to see how a lot of small individual contributions add up over time. A project still needs a good maintainer and vision though, and that's a lot of work for someone.

hbbio|6 years ago

Just looking at the source and finding out it's JavaScript.

Although I'm probably living in a cave and didn't use Linux often on the desktop since years, it is common practice now to write Gtk/Gnome apps in JS? I tought Vala was the cool language for that kind of apps...

chrisseaton|6 years ago

> I tought Vala was the cool language for that kind of apps...

I think you’re about ten years behind the trend.

pratio|6 years ago

It uses epub.js which i think is really cool for rendering the documents. The UI looks pretty impressive as well. For anyone coming from Calibre, this would look amazing

rhodysurf|6 years ago

GJS is the easiest way to write Gtk/Gnome apps these days, and it uses the native controls

truncate|6 years ago

I saw JavaScript and for a moment, and I was like - "Oh no, not electron again", and moment later I was happy to see that it was not Electron!

ASalazarMX|6 years ago

Saw that too and dismissed the project.

My PC has plenty of resources, but if I'm going to use a browser to read books, I might as well upload it to Google Play Books and use the browser I already have open for other things. It has the same functionality and my progress and bookmarks are synced across devices.

Granted, epubs are easily converted to HTML, but I shouldn't need an additional few hundreds Mb of RAM to read a 5Mb file.

cosarara|6 years ago

I'm glad to see hyphenation was taken into account, even if it requires some extra packages. On the Android epub readers I've tried it never seemed to work (maybe they only support English if at all?).

ZuLuuuuuu|6 years ago

I like how it gives an option for margin size. It even allows 0 margin! One of the most annoying things about Google Play Books is that it puts pretty big margins to left and right and you have no control over them, so my phone's screen is wasted on a lot of empty space. Amazon Kindle is better because it provides a narrower margin option but I would prefer just 0 margin on my phone.

Also the app itself looks nice and native, good job.

xvilka|6 years ago

Why don't use the compilable language? Nobody think about resources these days.

iamnotacrook|6 years ago

How do you know they didn't consider resources?

If you want to compile a language you're going to need a compiler and a linker. Do you know how much water it takes to compile a single executable? Water that's better used irrigating a field which could support hundreds of well-written python and bash scripts.

richard_todd|6 years ago

In this case, I don't know how much it matters--EPUB is basically HTML, so you are going to be based around a browser-like component anyway. Might as well code the UI in js.

rhodysurf|6 years ago

This isnt electron, GJS uses native GTK controls

squarefoot|6 years ago

I wanted to give it a try, but attempting to build a Debian package fails.

$ dpkg-buildpackage

...

gpg: skipped "John Factotum <50942278+johnfactotum@users.noreply.github.com>": No secret key gpg: dpkg-sign.LHxm7FS6/com.github.johnfactotum.foliate_1.4.0.dsc: clear-sign failed: No secret key

dpkg-buildpackage: error: failed to sign .dsc file

edit: build does indeed work and I could use the viewer, building a Debian package fails though.

wjbolles|6 years ago

I had the same issue and got it to work with dpkg-buildpackage --no-sign

Santosh83|6 years ago

Any reason why this can't be cross platform? Seems to be mostly using supposedly cross platform libraries like GTK...

hawski|6 years ago

AFAIK GTK cross platform effort was always secondary. Now from version 3 even more so.

swebs|6 years ago

I see no reason why it wouldn't work. Try building it on your platform of choice

Shorel|6 years ago

I dual boot everyday. I want to have equivalent software for both Linux and windows, to not to change my workflow too much.

I am using Freda in Windows to read ebooks.

I was worried about what to use in Linux. The Calibre viewer simply doesn't have the same quality as Freda.

Foliate is great, and I no longer worry about this. Thanks for the heads up.

bborud|6 years ago

What makes it "modern"?

lulouie|6 years ago

In my case, the most competitive UI in desktop e-reader

tndl|6 years ago

Could OP or someone else give an overview of how web-based interfaces work on native apps like this, without using something like electron? Is there a full js interpreter, dom, css parser, etc in something like Foliate?

Guillaume86|6 years ago

In the readme I see:

   The following are runtime requirements:
   gjs (>= 1.52)
   webkit2gtk
So my guess is that it's just using webkit for the html rendering.

Improvotter|6 years ago

Looks really nice. I am wondering who is reading eBooks on their computer though. Isn't it annoying to be reading a whole book on your computer?

dmix|6 years ago

I read programming ebooks on my computer while typing out the programs into Vim. As I learned from Zed in his C book that you must type out the code examples if you’re going to learn from them, which I’ve found extremely useful.

Otherwise for long form reading sections I switch back to my Kindle, tablet, or paper book.

The other times I read on my computer are shorter academic papers, reference, and sampling the first chapter of books before switching them to my Kindle or tablet.

Jnr|6 years ago

Very cool! Lately I rarely see good new GTK applications coming out so this warms my heart. :)

johannkokos|6 years ago

Does it support multiple tabs? It doesn't seem to from the screenshot.

johnfactotum|6 years ago

Currently there's no tabs support. But it does support multiple windows.

diehunde|6 years ago

Looks great! I've been looking for a good e-reader for Linux lately.