I’ve recorded an episode of HPR, and it’s out today! In this episode I chat about my Ubuntu Ebook Template Project – I’m still battling with giving a voice to my ebooks but hopefully a wise HPR community member might be able to offer some advice.
Why not record your own HPR episode. It’s super fun and easy to do. Head over to Hacker Public Radio and see how easy it is to contribute.
I have been working this evening on the sharing process for ebooks. Tonight I managed to get a book to upload to launchpad and to make it available. Currently it is a nonsense collection of pages, examining aspects of page layouts, and a copy of a 1 star rating for a review of a Steven King follow up to The Shining – Dr Sleep
There is still work to do on the process – currently there needs to be a link made between the installation location (/usr/share/books) and the current user’s directory – but I have some scripts that should accomplish this that were developed as part of the content packaging for Severed Fifth’s Nightmares by design album.
There were a few dependencies that I had forgotten about, but a couple of retries and the process ran successfully.
Build time for the book took 2 minutes.
test2 ebook – as seen in the ubuntu Software Centre
If you want to install the book yourself – add ppa:computa-mike/testbook to your ubuntu system’s software sources.
There’s a guide to adding a PPA to your software sources here.
The raring deb file can be found here.
I have also found a very interesting python library for epub, and I seem to be replicating much of the work that Aleksandar Erkalovi? is doing with this library – so I plan to replace my library with his, adding in any missing features back to the main library (if at all possible). I think this would be the best approach as it reduces duplicated effort.
So in the latest 13.04 repositories, Kompozer is no longer supported. It used to be supported by the Debian project but was dropped in October 2012. The alternative is to install the dependencies manually and then install Kompozer from a deb file provided by the community project. This makes installing Kompozer a less attractive proposition for projects that want to be part of the ubuntu software centre, and rely on kompozer to provide editing functionality. Combine this with the issues I was having trying to automate Kompozer using DBUS, and the drive then is to look at a better alternative.
ubuntu ebook template – web editor
And I think I have one.
I recently completed a python course, and this lead me to look at python much more clearly. I discovered that python has a built in web server, so i started wondering if I could use the CGI services supplied by that server to load and save chapter files from the ebook project. Couple of hours later I have this :
It’s still a work in progress – my UI design skills are somewhat lacking – but it does have some potential. To activate this editor, I created a new command called webedit. This command starts a webserver, and launches a URL in the default browser. The links down the left hand side have dummy data at the moment, but it should be possible to read values from the ebook spine, and present the contents in order. Each link passes a different filename to the server, and that file is read from the project directory and injected into the tinymce control that is in the page. Page layout is defined using jinja, a templating language for python. As a matter of interest I found I had to add cr/lf’s between each line. The template must work on a line by line basis.
I defined the template using Divshot – an online design and layout tool.
This technique currently uses a standard port (8000) – so this could cause issues if you wanted to update multiple books at the same time – it might be possible to catch the error, and increment the port until an available port is identified, but realistically having 2 ebooks on the go at the same time seems unlikely.
I have been experimenting with the functionality of the Ubuntu ebook template. The idea is that if you are writing your book using the template, that the same content can be published to an ebook and an audio book. The new command to accomplish this is :quickly read.
Want to help?
Want to try Ubuntu Quickly for ebooks? then pop over to https://launchpad.net/quickly-ubuntu-ebook and get involved.