View Single Post
Old 08-12-2012, 02:50 AM   #28
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 594
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
Quote:
Originally Posted by Hitch View Post
Hi:
Not to be particularly dense (and heavens knows, I can be), but what's the advantage of this over simply creating a templated page, inserting it into the ePUB and typing 2-3 things?
Hi,

I am not sure about what "this" refers to (the Calibre plugin or the entire exlibris project?), so let me explain the rationale of exlibris.

Initially exlibris has been developed as a command line tool, with the idea of using it inside a massive EPUB production loop. In particular, I had in mind the needs a friend who wanted to have a personalized ex libris inside each of his 1000+ EPUBs. He just needed to run a (Bash) command like:
Code:
$ for book in `ls *.epub`; do python exlibris-cli.py "$book" "$book.epub.new" exlibris.xhtml; mv "$book.epub.new" "$book"; done
to have the task accomplished. No manual editing at all!

Later, someone suggested that exlibris should have had the capability of replacing strings in the exlibris.xhtml template with the book metadata or strings passed on the command line. The latter was requested exactly for a watermarking-like process, aimed at creating "personalized" ebooks:
Code:
while read member
do
   id=`echo $member | cut -d" " -f1`
   name=`echo $member | cut -d" " -f2`
   python exlibris-cli.py book.epub "book-$id.epub" exlibris.xhtml -r "name=$name;"
done < members.txt
This would personalize book.epub by creating a different file for each member and inserting a personalized "Happy Birthday $name !" ex libris in it.
Again, besides creating the file members.txt (in my case, exporting it from a database, and containing id and name for each "member", one member per line) there is no manual editing at all. In the specific case, I had to create a personalized EPUB for more than 100 people.

Finally, someone suggested the idea of providing a GUI for those that are not in friendly terms with the command line and, eventually, a Calibre plugin, given the popularity of the latter. But these are intended just as different ways of invoking the main exlibris library. To continue the analogy, for example by selecting a subset of your calibre library rather than using the for loop of my first example.

Let me know if something is still unclear.

Last edited by AlPe; 08-12-2012 at 02:58 AM.
AlPe is offline   Reply With Quote