rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
25 stars 12 forks source link

Add content-hub support #61

Open popey opened 10 years ago

popey commented 10 years ago

One of the features I'd love to see is to be able to get files into Beru more easily using content hub.

A good example app is pdfjs https://github.com/bobo1993324/pdfjsViewer which can load in PDF files via the file manager. Would be great if Beru could call out to the file manager to pull files into the Beru directory, files that have been selected by the user. These could have been dragged/dropped onto the phone via MTP or that have been put on an SD card and inserted (for devices which support this) :)

(of course it would be more ideal if we had an ~/Books folder which was read directly, but in lieu of that)

rschroll commented 10 years ago

Every time I've looked at the content hub documentation in the past, I've gone crosseyed two paragraphs in. I guess it's time for another attempt.

For the record, Beru is perfectly happy to read books from ~/Books, or wherever you put them. I've compiled several methods for enabling this here: http://rschroll.github.io/beru/confinement.html

rschroll commented 9 years ago

I got a chance to talk with Ken Vandine about this, and unfortunately the Content Hub isn't ready for us yet. There are two issues:

  1. There's no ebook content type. I've filed a bug about this, and Ken thinks it'll be addressed pretty soon. This will allow us to download epubs from the web browser and open them with Beru.
  2. There's no support for getting files from the file system, as opposed to other apps. Thus, there's no way to get files from a folder on your desktop or drag epub files to your phone.
popey commented 9 years ago

1) is done now 2) can be done if you have file manager installed.

If you add an import handler then things downloaded from the browser can be passed to beru. However it may pass you .mobi or other "ebooks" which you don't support, in which case you'll need to error appropriately.

rschroll commented 9 years ago

I've written a little importer as a test, but it doesn't work with anything other than ContentType.Pictures. This is not encouraging....

How can I tell if the EBooks content type has made it into the devel images?

rschroll commented 9 years ago

Beru now supports imports. Export support will wait for a little.