Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-04-2012, 08:38 PM   #151
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.2.2 Released

Changes in this release:
  • Add a "Remove inline javascript and files" option to remove any javascript leftover from html conversions
  • Fix for CSS margins feature which was not always updating the css file in the epub after resetting margins
kiwidude is offline   Reply With Quote
Old 06-05-2012, 05:04 AM   #152
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.2.3 Released

Changes in this release:
  • Further optimise the CSS margins feature to minimise which files get changed
kiwidude is offline   Reply With Quote
Old 06-05-2012, 03:06 PM   #153
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.2.4 Released

Changes in this release:
  • Add some non-standard guide types of "coverimagestandard" and "thumbimagestandard" to increase cover replacement coverage
  • If the guide has incorrect casing of an image href, auto-correct it

Some more edge cases to help with the cover detection for some of the more obscure/badly formed scenarios, which will reduce the likelihood of double covers.

I discovered these with a retail ePub this afternoon, shows how sloppy some of the publishers are out there.
kiwidude is offline   Reply With Quote
Old 06-05-2012, 06:23 PM   #154
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,155
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by kiwidude View Post
Changes in this release:
  • Add some non-standard guide types of "coverimagestandard" and "thumbimagestandard" to increase cover replacement coverage
  • If the guide has incorrect casing of an image href, auto-correct it

Some more edge cases to help with the cover detection for some of the more obscure/badly formed scenarios, which will reduce the likelihood of double covers.

I discovered these with a retail ePub this afternoon, shows how sloppy some of the publishers are out there.
Please don't add coverimagestandard and thumbimagestandard as those are two things that I do remove when I find them and I also remove the thumbnaill images as well since they have no use and are a leftover from MS Reader days. In fact, what I would like is for both of those guide options and the associated thumbnail images to be removed if found. Both ADE and iBooks don't need them. So why have them?

Last edited by JSWolf; 06-05-2012 at 06:27 PM.
JSWolf is offline   Reply With Quote
Old 06-05-2012, 06:40 PM   #155
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
I don't "add" anything in regards to those reference types. In fact it is quite the opposite - those guide entries (just like all the other.ms-* ones) get *stripped* when you run the insert/remove cover functionality.

When the cover has not been correctly identified using other methods like a type of "cover" in the reference, the fallback is to try to guess an existing cover using the guide reference entries of type "other.ms-*". What this change does is add "coverimagestandard" to that list of possible reference types to indicate an existing cover image. Prior to the change, those entries were not considered as possible cover pointers, nor were they stripped. So I believe you will find this change perfectly fits your desired behaviour.
kiwidude is offline   Reply With Quote
Old 06-11-2012, 07:18 AM   #156
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 637
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
@kiwidude:

I would like to request a further enhancement to your very useful plugin.

It would be most helpful to have a search/replace facility added. This would work exactly like the regex search/replace in calibre conversion, (including save/load sets), but would work on the xhtml files of the finished ePub rather than on the intermediate xhtml seen during conversion.

What do you think? Is this complicated? Would other users also find this useful?
Agama is offline   Reply With Quote
Old 06-11-2012, 07:46 AM   #157
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
I don't see the use case for it? Why would you blindly want to do search/replace operations across your ePubs? For me search/replace is something I do in an editor like Sigil, as context is usually important. Surely you need to look at the document first to figure out what you are going to search for?

To answer your other question, yes it would be a lot of work.

You obviously have some scenario/situation in mind...?
kiwidude is offline   Reply With Quote
Old 06-11-2012, 12:29 PM   #158
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 637
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
Quote:
Originally Posted by kiwidude View Post
You obviously have some scenario/situation in mind...?
I use some standard search/replaces to make the books that I publish conform to a similar look and feel, (kind of like Feedbooks all have the same theme and internal structure), and they are content independent - for example removing all class="calibre[0-9]*" attributes from tags. (I replace the generated stylesheet.css with my own standard one). I always convert from markdown to ePub and then use the resultant ePub as the starting point for a publication. At the moment I apply all the regexes via Tweak ePub/Notepad++ and also use some VBScript for other changes, but it's a bit onerous.

The process would only be applied to a single ePub at a time and would be used straight after conversion. It would obviously not be useful to apply to ePubs generally.

I am sure that Sigil could also do the job but it would have the same labour intensiveness that Tweak ePub has.

Agama is offline   Reply With Quote
Old 06-11-2012, 01:12 PM   #159
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Yeah that all is very specific to your workflow and not generally useful/reusable I'm afraid.

If it was me in that situation I would just write a specific plugin to do that task, including the stylesheet replacement etc and get it all done in one hit. I imagine it wouldn't have to be a GUI plugin either, IIRC the conversion pipeline has provision for a "File type" plugin to run either pre or in your case post processing to manipulate the results, which would probably be the ideal place for something like this.
kiwidude is offline   Reply With Quote
Old 06-11-2012, 02:41 PM   #160
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 637
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
Quote:
Originally Posted by kiwidude View Post
If it was me in that situation I would just write a specific plugin to do that task, including the stylesheet replacement etc and get it all done in one hit.
Agreed, this is the best solution. My hybrid Tweak/Regex/VB is better than fully manual but still a bit of a chore. I guess I just need to bite the bullet and get to grips with calibre plugins and Python.
Agama is offline   Reply With Quote
Old 06-11-2012, 09:30 PM   #161
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
I am wondering if there's any chance of an addition to either Calibre or Modify Epub that will prevent the removal of blank lines after a heading code, and centered line. At the moment I am removing blank lines then having to go back into Sigil to replace spacing between the chapter headings (say) and the start of text. I also like to maintain a space where there is a "soft break", or whatever the term is, in a chapter. You know *** or whatever.

If there is an existing way to do this - say using search and replace, which I haven't been able to use because I'm not very html literate - I'd love to know how and would appreciate a heads up.

Last edited by Hoods7070; 06-11-2012 at 09:38 PM.
Hoods7070 is offline   Reply With Quote
Old 06-11-2012, 10:26 PM   #162
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,155
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Hoods7070 View Post
I am wondering if there's any chance of an addition to either Calibre or Modify Epub that will prevent the removal of blank lines after a heading code, and centered line. At the moment I am removing blank lines then having to go back into Sigil to replace spacing between the chapter headings (say) and the start of text. I also like to maintain a space where there is a "soft break", or whatever the term is, in a chapter. You know *** or whatever.

If there is an existing way to do this - say using search and replace, which I haven't been able to use because I'm not very html literate - I'd love to know how and would appreciate a heads up.
Are you telling Calibre to remove blank lines between paragraphs during conversion? If so, that could be your initial problem. But all you need to is edit the CSS to add in a bottom margin to the class used for the chapter headers.
JSWolf is offline   Reply With Quote
Old 06-12-2012, 12:36 AM   #163
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Yes, I do get blank lines out with Calibre. I didn't realise I could CSS for that - thanks for the tip.
Hoods7070 is offline   Reply With Quote
Old 06-12-2012, 12:28 PM   #164
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,155
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Hoods7070 View Post
Yes, I do get blank lines out with Calibre. I didn't realise I could CSS for that - thanks for the tip.
The problem is that Calibre doesn't know what blank lines you want vs. ones you don't want. Also you could be getting rid of section break spacing. This is why I leave the line spaces alone and edit the CSS to remove the extra line spaces I don't want. This way, I get the ones I want and can edit them to be how much space I want.
JSWolf is offline   Reply With Quote
Old 06-13-2012, 01:27 AM   #165
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Yes, that's proved a pretty big problem for me because unfortunately I converted a lot of my books when I first started and lost nearly all my section breaks. It's a pity those aren't marked up consistently in all books with characters or a break code instead of paragraph codes. The upside of my mess-ups is that I've go to know Calibre and Sigil a whole lot better. By the time I've finished wading through all my books I will be half educated.

Yes, you guessed, after a superficial glance to make sure lines had been removed and indents added I deleted the original-epubs. That was some time ago - I've only just discovered the extent of the damage I've done after reading several converted books.
Hoods7070 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 732 Today 05:04 AM
[GUI Plugin] Manage Series kiwidude Plugins 111 07-10-2014 11:25 PM
[GUI Plugin] Open With kiwidude Plugins 223 07-09-2014 02:42 AM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 05:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 09:53 AM.


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