[Ilugc] How to create cover images for all the ebooks in ProjectMadurai.org ?

  • From: sathia2704@xxxxxxxxx (Sathia S)
  • Date: Tue, 29 Jul 2014 20:18:11 +0530

On Tue, Jul 29, 2014 at 6:57 PM, Shrinivasan T <tshrinivasan at gmail.com>
wrote:

We are planning to convert all the ebooks in http://ProjectMadurai.org
as epub files, so that any one can read them on the latest devices
like andoid and ios devices.

We will be using http://pressbooks.com to convert them as ebub.
There are around 500 ebooks.

We are looking for volunteers to convert them all as epub and mobi.

In the meantime, They all need cover images.

On my request, sathia tried a rails app.

https://github.com/sathia27/project_madurai


But, it got unicode issue.

I solved this unicode issue in another way. Same as wkhtmltopdf method.
This method internally creates html file with title, author and other
attributes and then it will take screenshot with help of phantomjs. Check
http://phantomjs.org/. you can look source code in
https://github.com/sathia27/project_madurai

So it is release as gem. You can just install this library and run to
generate images ( check project page for installation ).




I tried using python to add a tamil text over a image.

The Tamil Text is displayed as splitted.

Sample Image: http://postimg.org/image/8z7ed377r/

http://comments.gmane.org/gmane.org.user-groups.linux.ilugc/84982



I too got the same issue what sathia gets.


Then, How to solve this?

This seems a great unicode issue and there is no programmable solution.

Here comes the power utilities of GNU/Linux.
when programming cant help much, shell can help.

There is a utility called "wkhtmltopdf" which can convert html as PDF.

Shall we create html pages with all the book name and author name details?
Then, we can convert as PDF.
Then, PDF to image.

Will it work?

We use wkhtmltoimage to convert the html files into images.


Example :

wkhtmltoimage --height 640 --width 429  001.html 001.jpg




Using this method, we can convert all the html files to images directly.

-- 
------------------------------------------------------------------------------------------



Regards
sathia

Here I share my experiments with open source.
http://www.sathia27.wordpress.com

Other related posts: