ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #18028
Re: [Challenge] Ebook reader
On Mon, Feb 1, 2016 at 10:33 AM, Neil McPhail <neil@xxxxxxxxxxxxxx>
wrote:
The app is an ebook reader, and should be capable of displaying books
in a
variety of formats (epub, txt, mobi etc). It should also have a
text-to-speech engine, and the displayed text should follow the
text-to-speech engine in real time. These things are relatively
trivial to
implement. However, some things are not so easy to achieve on Ubuntu:
As someone who actually has built an ebook reader for the Ubuntu phone
[1], I figured I might have some insight here. At the moment, Beru
supports Epub, PDF, and CBZ files, though not particularly well in the
latter two cases. TXT file support would be pretty easy, actually, but
I didn't know that was actually a thing. (Is that actually a thing?)
As for text-to-speech, my idea of trivial is somewhat different than
yours.
1) It should be possible to add books from internet sites such as
Project
gutenberg
Early versions of Beru actually had a built-in web browser to allow
this. Advances in the content hub (and churn and bugs in the web
browser and downloader components) convinced me to give this up.
However, to get any support for ebooks in the content hub, I had to
submit a bug against the content hub itself, which obviously doesn't
scale. And once that was fixed, I still have to wait for all other
apps to add support for this new content hub. I use the present tense
purposefully there.
So, last I checked, the web browser would let you open Epub and PDF
files, but not CBZ files, with Beru. The file manager would only let
you open PDF files with Beru. Unless you triggered it via the "Import
from Content Hub" option within Beru, in which case it'll pass any type
of file ever. Clear?
The root cause of this insanity is that the content hub doesn't
actually say anything about what the content types are. Each
application is responsible for determining file type, and therefore
must be updated every time anyone anywhere adds a new file type.
This problem has been solved on the desktop since before Ubuntu was a
gleam in the BDFL's eye, so I'm not sure why we're having it here. The
obvious (to me) solution is using MIME types to define content types,
but that bug [2] just had it's 20-month anniversary.
I don't think the documentation on Content Hub is clear
or comprehensive enough, and I see that view echoed on the IRC
channels.
I agree, and wrote a rather extensive bug report about some of the
problems I saw [3]. It's been "In progress" for 10 months now.
2) It should be possible to add books via USB cable from computer
This was the first feature past basic display that I wanted, and it's
still not possible. Every time I mention this, "Yeah, that'd be
useful, but you can't do it yet. Maybe when the content hub ...?" A
relevant bug [4].
This has irritated me to the extent that there is a version of Beru in
the Open Store that actually makes this work [5]. It lets the user
specify which directory Beru should watch for new books. Once you've
connected your device over USB, you can just drag your books over and
things just work. Of course, this is a heinous security vulnerability.
There's an important bit for user freedom that I think you've missed:
2.5) It should be possible to open the books you've added with any
ebook reader.
This isn't possible right now, since the books Beru can read are kept
in its own silo, where another reader can't get at them. If Beru
offered an export option, things wouldn't be so bad, but I'm an evil
monopolist trying to exploit first-mover and lock-in advantages.
Mwa-ha-ha-ha-ha!
3) It should be possible to add books via Bluetooth from another
device
The ebook reader shouldn't know anything about Bluetooth, IMO.
Bluetooth transfer would be nice, but it should look just like USB
transfer -- hey there are some new books in this directory I've been
told to watch! Cool! I'll open them if you'd like me to.
4) It should be possible to add books over WiFi from computer
Whoa now! Don't get greedy.
5) It should be possible to store or add books from an SD card
Hahahahahahahaha...
9) It should be possible to sync the library, reading positions etc
to a
central source
I purposefully architected Beru so that the reading positions and other
settings were stored in their own U1DB that could be synchronized over
Ubuntu One. And then Ubuntu One shut down.
Frankly, though, the solution to me would seem to be to keep
configuration in a central place, so you can use Dropbox, etc, to
synchronize your settings without the app needing to be aware of this.
The XDG directory structure makes this easy. The Ubuntu confinement
model makes this nearly impossible.
10) It should be possible to cut and paste from books in the app
Ya know, I don't know if this will work in Beru. I suspect not,
because any touch triggers a link or a page change.
Part of my reasoning behind working on an ebook reader was, like you
suggest, to see what the platform is capable of. It's great the you're
thinking along the same lines, but so far the progress hasn't been
particularly encouraging.
Robert
[1] http://rschroll.github.io/beru/
[2] https://bugs.launchpad.net/ubuntu/+source/content-hub/+bug/1324985
[3] https://bugs.launchpad.net/ubuntu-brand-guidelines/+bug/1430490
[4] https://bugs.launchpad.net/ubuntu/+source/content-hub/+bug/1425955
[5] https://open.uappexplorer.com/app/com.ubuntu.developer.rschroll.beru
Follow ups
References