
Foliate – A simple and modern GTK eBook viewer - lulouie
https://github.com/johnfactotum/foliate
======
lulouie
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
> Calibre: Failed to open

Perhaps this says more about Arch than it does Calibre.

~~~
lulouie
yep, is because Arch (basically because qt5 upgrade...), and with the issue on
it:
[https://bugs.archlinux.org/task/63051](https://bugs.archlinux.org/task/63051)

$ calibre

Fatal Python error: PyQt5.QtCore: Unable to embed qt.conf

[1] 13321 abort (core dumped) calibre

At that moment, I didn't have time to workaround on it :(

~~~
r3bl
Ah, too bad. It's the crappiest of the bunch UX-wise, but nothing comes close
to it feature-wise.

I don't use it to read (I have an e-reader for that purpose), but I'd be lost
without Calibre for ebook management.

~~~
crooked-v
I really wish there was a practical alternative to Calibre for general ebook
organization purposes. It's extra-painful that Books.app on Mac could almost
fit that role, except that it doesn't let you edit enough metadata for your
own imported files to properly manage series/publisher stuff.

------
JasonFruit
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
> 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."

~~~
lpcvoid
I propose on building native tools that have all relevant libraries statically
linked. Yeah, executable will grow in size, but it's the best of both world :
portability, speed and not using javascript.

------
hbbio
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
> I tought Vala was the cool language for that kind of apps...

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

~~~
CameronNemo
Nope, new applications are commonly being written in Vala.

For example bookworm, a GTK eBook viewer.

~~~
chrisseaton
I didn't say all new applications were being written in JS, did I? So any
number of counterexamples does not disprove what I said. We were talking about
the trend of what people were looking at using now.

~~~
makapuf
Ok, please: what language are people using when they want to create gnome
software ? Or the trend of what people are looking at using, if you prefer.
Edit: switched two words.

------
navidr
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
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.

------
cosarara
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
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
Why don't use the compilable language? Nobody think about resources these
days.

~~~
rhodysurf
This isnt electron, GJS uses native GTK controls

~~~
Guillaume86
README mentions a dependency on webkit2gtk, probably only for the ebook
rendering but it's not far from electron in that case.

~~~
djsumdog
Yea, webkit2gtk is pretty heavy (or at least it seems that way when trying to
compile it), but it might have been the easiest way to render epub files as
their render is pretty similar to HTML.

It's all about tradeoffs and I don't think this one is too bad. I'm glad it
isn't a pure electron app.

Now we just need decent open hardware for Linux tablets! I'd love to use this
program to read books on one of those mythical open source tablets that can
run KDE Plasma.

------
umvi
Are there any open hardware eink ebook readers?

~~~
mswift42
I don't think there are any.

However, you easily can install alternative readers on Kobo ereaders, see here
for a list of some hacks:

[https://www.mobileread.com/forums/showthread.php?t=295612](https://www.mobileread.com/forums/showthread.php?t=295612)

~~~
PyroLagus
There's the BQ Cervantes, which runs FOSS software, but Kobo's open source
community seems much more active.

[https://github.com/bq/cervantes](https://github.com/bq/cervantes)

[https://blog.bq.com/es/bq-ereaders-developers-
program/](https://blog.bq.com/es/bq-ereaders-developers-program/)

------
DominoTree
This will be great to use on the Librem 5 when it's released!
([https://puri.sm/products/librem-5/](https://puri.sm/products/librem-5/))

------
squarefoot
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
I had the same issue and got it to work with dpkg-buildpackage --no-sign

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

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

------
Shorel
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
What makes it "modern"?

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

~~~
lottin
It does look pretty and it's probably very usable on a tablet, but on a full-
featured computer (i.e. one equipped with keyboard and mouse) it's inefficient
and idiotic.

~~~
jmiskovic
Your comment is overly hostile. The author is present, you could give some
constructive feedback instead of insulting the design.

I actually disagree with you, the UI seems elegant and very usable on desktop.
Maybe smallish window size on screenshots give impression that it's more
suitable for tablet?

~~~
lottin
Ok, idiotic was not the right word. I apologise.

------
tndl
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
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
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
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
Very cool! Lately I rarely see good new GTK applications coming out so this
warms my heart. :)

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

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

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

