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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-27-2011, 06:30 PM   #166
capnm
Groupie
capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'
 
Posts: 150
Karma: 10001
Join Date: Feb 2011
Device: sony
Well, I'm not sure if I got this right, because I had to quit before I was sure I had figured out what was going on, but does this make sense:

In a body {...} statement

1) margin: property ( as opposed to margin-top: etc)

body {margin: 1em; }

Is not found by Quality Check
Is properly found and stripped by Modify Epub


2) a declaration without a trailing semi-colon (last or only declaration in rule)

body {margin-top: 1em }

Is found by Quality Check
Is not found by Modify Epub
capnm is offline   Reply With Quote
Old 06-28-2011, 01:19 AM   #167
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quality Check should flag scenario 1 ('margin' in a body class) based on a code review, there is also logic where Quality Check will multiply the value of the margin style and multiply it by 4 - if the multiplied value is less than the total of the configured Calibre margins then it won't be flagged - I suppose I could make the logic here a bit more precise if Calibre's four configured margins aren't equal.... If you can confirm it doesn't work on an ePub PM me an example.

I'll need to look into scenario two - Modify ePub should absolutely work if there are more than one style settings with a semi-colon between them - two style settings without a semi-colon wouldn't be valid css. Quality Check and Modify ePub use the same logic to break the styles into pieces, so it would be odd if one worked and the other didn't...

I haven't tested the example with just a single style with no semi-colon though, it's possible Python isn't handling that string the way I intended, I'll check that case.
ldolse is offline   Reply With Quote
Old 06-28-2011, 01:52 AM   #168
capnm
Groupie
capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'
 
Posts: 150
Karma: 10001
Join Date: Feb 2011
Device: sony
I can't check right now ....
But I'm pretty sure this

body { ...blah...; margin-left:1em; margin-right:1em }

was modified to

body { ...blah...; margin-right:1em }


I'm not as sure about what QC didn't pick up --

But I was getting rushed about then ....

Otherwise it's great!

Last edited by capnm; 06-28-2011 at 02:35 AM. Reason: faulty memory
capnm is offline   Reply With Quote
Old 06-28-2011, 06:33 AM   #169
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Found a problem which matches your initial description, as it's a bit of an edge case I'm thinking to hold off on an updated release until I wrap up the inline rewriting functionality.

Regarding this second description - I don't think modify ePub could leave an em margin hanging out, the way the rewrite works all the original margin properties are discarded.
ldolse is offline   Reply With Quote
Old 06-28-2011, 12:28 PM   #170
capnm
Groupie
capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'
 
Posts: 150
Karma: 10001
Join Date: Feb 2011
Device: sony
Okay, I can't seem to consistently reproduce what's going on

But then it seemed like it might have to do with spaces .... ???

I had time for one last test:
Took a cleaned epub, and before the
@page {margin-right:5.0pt;margin-top:5.0pt;margin-left:5.0pt;margin-bottom:5.0pt; }
you add at the end, I added

Code:
body {text-align: justify; margin-top:1em; margin-left:1em}
body {text-align: justify; margin-top: 1em; margin-left: 1em}
body {text-align: justify;   margin-top:1em;   margin-left:1em}
body {text-align: justify;margin-top:1em;margin-left:1em}
body {text-align: justify;  margin-top:  1em;  margin-left:  1em}
body {text-align: justify;   margin-top:  1em;   margin-left:  1em}
and got
Code:
body {text-align: justify;  margin-top:1em;  margin-left:1em }

body {text-align: justify;  margin-top: 1em;  margin-left: 1em }

body {text-align: justify;    margin-top:1em;    margin-left:1em }

body {text-align: justify }

body {text-align: justify;   margin-top:  1em;   margin-left:  1em }

body {text-align: justify;    margin-top:  1em;    margin-left:  1em }
-officially confused
capnm is offline   Reply With Quote
Old 06-28-2011, 01:15 PM   #171
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Whitespace would do it now that I double-check the code - I thought I was stripping it, but looks like I did't strip the whitespace where it counts in that instance.
ldolse is offline   Reply With Quote
Old 06-28-2011, 02:22 PM   #172
capnm
Groupie
capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'
 
Posts: 150
Karma: 10001
Join Date: Feb 2011
Device: sony
Glad to hear that.
I was beginning to think I was losing it
I wouldn't have noticed the presence or absence of whitespace when I first encountered the problem
capnm is offline   Reply With Quote
Old 07-12-2011, 03:04 AM   #173
GreenMonkey
DRM hater
GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.GreenMonkey ought to be getting tired of karma fortunes by now.
 
GreenMonkey's Avatar
 
Posts: 882
Karma: 2008318
Join Date: Jun 2010
Location: Michigan
Device: Nook ST glow, Nexus 7 (2013). Wife:Kindle Paperwhite, ipad mini R
Kiwi, your plugin is very useful for tweaking covers without a full run through the Calibre conversion engine, thanks!

I've got a Penguin Classics epub that had no cover (or, I should say, I lost it after...umm...plugin processing).

The only way I could add a cover was to run conversion..and then I ended up with a broken image page called oeb_cover_r1.xhtml with a false cover (bad image path) I had to clean up.

I hope you eventually work out a "replace cover" function as you talked about a few weeks back. Sometimes it would be easier if I could just "insert cover" to a good epub that is missing one

Thanks kiwidude (and thanks for the suggestion of your plugin in one of the other cover threads).
GreenMonkey is offline   Reply With Quote
Old 07-26-2011, 06:35 AM   #174
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,861
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Flatten TOC

The person in this post is asking for the option to flatten the TOC. Her reader can only read the first level of a TOC. I think this idea would fit this plugin perfectly.
DoctorOhh is offline   Reply With Quote
Old 07-27-2011, 07:06 PM   #175
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@dwanthny - I agree, it would be a relatively simple addition to this plugin. Though I have currently handed the development baton for this plugin to Idolse. He was working any kinks out of his margin removal stuff, as well as potentially implementing the "add a new cover" logic plus some other ideas he had for this plugin.

I don't have the time right now to take it back on myself for a little while yet anyways so haven't asked about progress, but hopefully when Idolse is eventually done we can look at a new feature like this.
kiwidude is offline   Reply With Quote
Old 07-27-2011, 10:29 PM   #176
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I've been a bit sidetracked on some other projects but hoping to wrap up the margin manipulation portion soon and then tackle the cover removal. I haven't looked into how an NCX defines multi-level TOCs, so not sure what will be required to mod that.
ldolse is offline   Reply With Quote
Old 09-02-2011, 12:08 PM   #177
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,111
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
Any updates on this plugin
Dopedangel is offline   Reply With Quote
Old 09-03-2011, 11:00 PM   #178
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Status hasn't changed since the last update, life and other projects have gotten in the way as of late. The plugin won't be marked 1.0 until cover handling is implemented. There is a small bug in the css manipulation code which will trigger with some ePubs (read the previous posts for details), I have a potential fix for this, but I've been more inclined to look into re-writing all the css manipulation code to leverage cssutils so I don't have to reinvent the wheel and deal with my own buggy implementation.

The other functions are all reported to be bug free. Was there a specific function you were looking for in the plugin?
ldolse is offline   Reply With Quote
Old 09-04-2011, 09:31 PM   #179
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,111
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
Quote:
Originally Posted by ldolse View Post
Status hasn't changed since the last update, life and other projects have gotten in the way as of late. The plugin won't be marked 1.0 until cover handling is implemented. There is a small bug in the css manipulation code which will trigger with some ePubs (read the previous posts for details), I have a potential fix for this, but I've been more inclined to look into re-writing all the css manipulation code to leverage cssutils so I don't have to reinvent the wheel and deal with my own buggy implementation.

The other functions are all reported to be bug free. Was there a specific function you were looking for in the plugin?
No was just wondering why it never became part of the plugin downloader I was recommending it to someone but forgot where I got it from in the first place. Had to search a bit to find it. Maybe plugin updater should get a beta plugin tag as to me this is a very useful plugin but no one knows about it.
Dopedangel is offline   Reply With Quote
Old 09-09-2011, 05:49 AM   #180
carmenchu
Connoisseur
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 91
Karma: 159672
Join Date: Dec 2010
Device: none
Exclamation Plugin doesn't Modyfy anything!?

Steps:
  1. Downloaded + installed plugin --> Reset
  2. Quality check for duplicated jackets
  3. Copy to disk found item for comparison
  4. Run plugin (report in attached zip file)
  5. Sent book in library (thanks, OpenWith!) to WinMerge for comparison and added copy from (3)
  6. Files identical (report in attached zip file)
  7. Replaced in WinMerge book in library with new copy to disk (in case file updated only on copy to disk): again no changes.
  8. New Quality check for duplicated jackets again picked the same book
Query: bug/feature/my error?
Attached Files
File Type: zip Reports.zip (1.3 KB, 44 views)
carmenchu 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
Any web-to-epub plugin for internet browser? bthoven ePub 7 07-10-2011 05:14 AM
[Old Thread] Reading epub on viewer inexplicably changes the time stamp of epub greenapple Library Management 20 03-19-2011 10:18 PM
Easy way to modify thread subscription emails in bulk? snipenekkid Feedback 11 02-06-2011 03:47 AM
Another plugin dev question DiapDealer Plugins 2 12-11-2010 01:46 PM
Epub plugin dev DiapDealer Plugins 15 11-12-2010 09:36 AM


All times are GMT -4. The time now is 05:38 AM.


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