Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-14-2014, 10:31 AM   #1
Doonge
Connoisseur
Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 1184732
Join Date: Nov 2013
Device: Kobo Glo
Automatic routine when sending book to device (Kobo)

Hello, new to Calibre programmation.

I'd like to have some help starting (where to look at).

I'd like to clean and structure some of my books, but I typically use css rules that aren't supported by ebook readers (css pseudo elements like :first-letter, :first-element). It means that I'd need a routine that scans the css rules, and creates the pseudo element within the HTML structure when books are sent to a device (my Kobo) which doesn't support pseudo elements.

- when I manually edit a book, does that edit the file contained in the Calibre Library folder, or does that edit a diff file? (I might have dreamed, but I noticed my changes weren't always saved in the .epub files).

- when I send a book to a device, what are the automatic edit routines that are made by Calibre? (so I don't do them twice)

- And how to add one?

Thanks for your attention and your time.
Doonge is offline   Reply With Quote
Old 11-14-2014, 11:36 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by Doonge View Post
H- when I send a book to a device, what are the automatic edit routines that are made by Calibre? (so I don't do them twice)
There is no editing of content that takes place at this stage. What IS updated is the metadata and (if it can be identified) the cover.
itimpi is offline   Reply With Quote
Advert
Old 11-14-2014, 07:18 PM   #3
Doonge
Connoisseur
Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 1184732
Join Date: Nov 2013
Device: Kobo Glo
Ok so there's a metadata edit routine.

Any lead as to where to look in order to add another routine next to it?

Thanks a bunch.
Doonge is offline   Reply With Quote
Old 11-14-2014, 07:50 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Most of what you want exists, or at least code you can use as examples.

The Modify ePub plugin does lots of modifications to the book code. You should find examples of what you want in it.

And as you have a Kobo device, the drivers almost support what you want. You can subclass the built-in KoboTouch driver and add the function you need. This already has a method to make some changes to the CSS. But, the KoboTouchExtended driver is probably more what you want. It does the sort of thing you want. It modifies the book code as the book is sent to the device.
davidfor is offline   Reply With Quote
Old 11-14-2014, 08:20 PM   #5
Doonge
Connoisseur
Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 1184732
Join Date: Nov 2013
Device: Kobo Glo
Ok, I will start looking there, many thanks.
Doonge is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable book conversion upon sending to device niagara94 Library Management 2 10-27-2014 09:34 PM
Different Send to Device routine based on the library. iatheia Library Management 10 01-24-2012 12:06 PM
Automatic sending of RSS news feeds to Kindle as blog/ebook janvanmaar Calibre 19 11-17-2010 01:16 PM
Run a command before sending book to device? Coleccionista Calibre 2 09-08-2010 04:55 AM
Book covers not sending to device tdavis74 Calibre 5 07-25-2010 11:38 PM


All times are GMT -4. The time now is 05:39 PM.


MobileRead.com is a privately owned, operated and funded community.