Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-18-2014, 06:30 PM   #721
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by PeterT View Post
Rev Bob... Might I suggest releasing this with a different name, and letting the official maintainer merge the functions into the released code if and when they see fit.

Having multiple plugins sharing the same name with different features is a tad confusing
If I were actually releasing this independently, I'd certainly do that. However, all I've posted here are beta versions...not releases. Furthermore, I've spoken with kiwidude and he's on board with adding these features...but neither of us wants to do a new release until we're sure the bugs are worked out.

I apologize if my commitment to making sure the code works properly has disappointed anyone, but the forks should be merged soon. Until then, you have a choice between the current release, a Qt5 port of that release, or my beta version that I've just mentioned has some bugs left to iron out. I hope to get that done this weekend, but time will tell.

davidfor's done the stuff I wasn't able to, and now I have to tackle the rest before handing it over to kiwidude as the next release. (No, I'm not posting the current build, because it still needs work.)
Rev. Bob is offline   Reply With Quote
Old 07-18-2014, 09:21 PM   #722
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Thank you everyone for making this plugin work with the future Calibre 2.0. I look forward to the day when it's just one version with all the new features.
JSWolf is offline   Reply With Quote
Old 07-18-2014, 09:28 PM   #723
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
You asked for it...

Now that I've had a chance to pick up davidfor's mods and address the bugs, here's a new version. This should properly handle Unicode and nested empty elements, as well as fixing the bugs. (Most pernicious bug: <div>blah<div class="x"/></div> would become <div>blah<div class="x"//> instead of properly remaining untouched!)

Stripspans also has a new tweak: it de-indents the <head> element and all the usual elements inside it, as well as the <body> element (but not its contents). That's purely a stylistic preference on my part, and I should note that it does not de-indent the contents of <style> elements - just the <style> and </style> lines themselves. Stripspans also keeps going over each document until it comes back unchanged, so there can be any number of contentless elements nested inside each other, and stripspans will catch them all. I tested this with a big string of nested bold and italic elements, at least a dozen levels deep, and stripspans removed 'em all.

I've said it before, but hopefully this will be the last time: I've attached the latest version, I think I've got the bugs worked out, and if nobody else can find one - let's say, by July 31, just before I have surgery - then I'll hand it off to kiwidude on August 1. That's about two weeks for testing; feedback and beta reports are greatly appreciated.

And yes, although the filename says "for qt5", it's also good for earlier versions.
Attached Files
File Type: zip Modify ePub - ss and sk for qt5.zip (65.8 KB, 327 views)
Rev. Bob is offline   Reply With Quote
Old 07-19-2014, 03:32 AM   #724
Req13
Enthusiast
Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!Req13 rocks like Gibraltar!
 
Posts: 28
Karma: 100000
Join Date: Mar 2010
Device: Kindle PW4, Sony PRS-T1, PRS-600 & Nook STR
Quote:
Originally Posted by Rev. Bob View Post
Now that I've had a chance to pick up davidfor's mods and address the bugs, here's a new version. This should properly handle Unicode and nested empty elements, as well as fixing the bugs. (Most pernicious bug: <div>blah<div class="x"/></div> would become <div>blah<div class="x"//> instead of properly remaining untouched!)
Thanks for the work you and others have done to add these features. It makes a great plugin even better. Good luck with the surgery.
Req13 is offline   Reply With Quote
Old 07-19-2014, 07:35 AM   #725
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
Now that I've had a chance to pick up davidfor's mods and address the bugs, here's a new version. This should properly handle Unicode and nested empty elements, as well as fixing the bugs. (Most pernicious bug: <div>blah<div class="x"/></div> would become <div>blah<div class="x"//> instead of properly remaining untouched!)

Stripspans also has a new tweak: it de-indents the <head> element and all the usual elements inside it, as well as the <body> element (but not its contents). That's purely a stylistic preference on my part, and I should note that it does not de-indent the contents of <style> elements - just the <style> and </style> lines themselves. Stripspans also keeps going over each document until it comes back unchanged, so there can be any number of contentless elements nested inside each other, and stripspans will catch them all. I tested this with a big string of nested bold and italic elements, at least a dozen levels deep, and stripspans removed 'em all.

I've said it before, but hopefully this will be the last time: I've attached the latest version, I think I've got the bugs worked out, and if nobody else can find one - let's say, by July 31, just before I have surgery - then I'll hand it off to kiwidude on August 1. That's about two weeks for testing; feedback and beta reports are greatly appreciated.

And yes, although the filename says "for qt5", it's also good for earlier versions.
I think I've found a slight bug. The plugin's output says it's stripping spans when there are no spans to strip. It should not be outputting that it's removing what's not there to remove.

Code:
Modify ePubs
Logfile for book ID 931 (The Hundred Thousand Kingdoms / N. K. Jemisin)
931
  Modifying:  C:\Users\Jon\AppData\Local\Temp\calibre_nivdok\itcjvh_modify_epub\931.epub
Parsing xml file: OEBPS/HundredThousan_opf.opf
Parsing xml file: OEBPS/HundredThousan.ncx
	Looking for files to remove: [u'iTunesMetadata.plist', u'iTunesArtwork']
	Looking for files to remove: [u'META-INF/calibre_bookmarks.txt']
	Looking for files to remove: [u'.DS_Store', u'thumbs.db']
	Looking for unused images
	Looking for broken links in the NCX
	Looking for Adobe xpgt files and links to remove
	Looking for Adobe DRM meta tags to remove
	  Removed meta tag from: OEBPS/HundredThousan_chap-24.html
	  Removed meta tag from: OEBPS/HundredThousan_teas-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-3.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-20.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-13.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-11.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-19.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-15.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-22.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-18.html
	  Removed meta tag from: OEBPS/HundredThousan_auth-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-12.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-10.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-4.html
	  Removed meta tag from: OEBPS/HundredThousan_adca-1.html
	  Removed meta tag from: OEBPS/HundredThousan_appe-2.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-5.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-7.html
	  Removed meta tag from: OEBPS/HundredThousan_blur-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-2.html
	  Removed meta tag from: OEBPS/HundredThousan_copy.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-23.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-21.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-16.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-1.html
	  Removed meta tag from: OEBPS/HundredThousan_ackn-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-29.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-9.html
	  Removed meta tag from: OEBPS/HundredThousan_toc.html
	  Removed meta tag from: OEBPS/HundredThousan_appe-4.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-28.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-27.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-25.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-8.html
	  Removed meta tag from: OEBPS/HundredThousan_foot-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-26.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-14.html
	  Removed meta tag from: OEBPS/HundredThousan_appe-1.html
	  Removed meta tag from: OEBPS/HundredThousan_appe-3.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-6.html
	  Removed meta tag from: OEBPS/HundredThousan_afte-1.html
	  Removed meta tag from: OEBPS/HundredThousan_chap-17.html
	  Removed meta tag from: OEBPS/cover.xml
	Looking for all jackets
	Looking for inline javascript blocks to remove
	Looking for .js files to remove
	Stripping spans
	  Stripped spans in: OEBPS/HundredThousan_chap-24.html
	  Stripped spans in: OEBPS/HundredThousan_teas-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-3.html
	  Stripped spans in: OEBPS/HundredThousan_chap-20.html
	  Stripped spans in: OEBPS/HundredThousan_chap-13.html
	  Stripped spans in: OEBPS/HundredThousan_chap-11.html
	  Stripped spans in: OEBPS/HundredThousan_chap-19.html
	  Stripped spans in: OEBPS/HundredThousan_chap-15.html
	  Stripped spans in: OEBPS/HundredThousan_chap-22.html
	  Stripped spans in: OEBPS/HundredThousan_chap-18.html
	  Stripped spans in: OEBPS/HundredThousan_auth-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-12.html
	  Stripped spans in: OEBPS/HundredThousan_chap-10.html
	  Stripped spans in: OEBPS/HundredThousan_chap-4.html
	  Stripped spans in: OEBPS/HundredThousan_adca-1.html
	  Stripped spans in: OEBPS/HundredThousan_appe-2.html
	  Stripped spans in: OEBPS/HundredThousan_chap-5.html
	  Stripped spans in: OEBPS/HundredThousan_chap-7.html
	  Stripped spans in: OEBPS/HundredThousan_blur-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-2.html
	  Stripped spans in: OEBPS/HundredThousan_copy.html
	  Stripped spans in: OEBPS/HundredThousan_chap-23.html
	  Stripped spans in: OEBPS/HundredThousan_chap-21.html
	  Stripped spans in: OEBPS/HundredThousan_chap-16.html
	  Stripped spans in: OEBPS/HundredThousan_chap-1.html
	  Stripped spans in: OEBPS/HundredThousan_ackn-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-29.html
	  Stripped spans in: OEBPS/HundredThousan_chap-9.html
	  Stripped spans in: OEBPS/HundredThousan_toc.html
	  Stripped spans in: OEBPS/HundredThousan_appe-4.html
	  Stripped spans in: OEBPS/HundredThousan_chap-28.html
	  Stripped spans in: OEBPS/HundredThousan_chap-27.html
	  Stripped spans in: OEBPS/HundredThousan_chap-25.html
	  Stripped spans in: OEBPS/HundredThousan_chap-8.html
	  Stripped spans in: OEBPS/HundredThousan_foot-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-26.html
	  Stripped spans in: OEBPS/HundredThousan_chap-14.html
	  Stripped spans in: OEBPS/HundredThousan_appe-1.html
	  Stripped spans in: OEBPS/HundredThousan_appe-3.html
	  Stripped spans in: OEBPS/HundredThousan_chap-6.html
	  Stripped spans in: OEBPS/HundredThousan_afte-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-17.html
	  Stripped spans in: OEBPS/cover.xml
ePub updated in 2.03 seconds
JSWolf is offline   Reply With Quote
Old 07-19-2014, 12:38 PM   #726
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by JSWolf View Post
I think I've found a slight bug. The plugin's output says it's stripping spans when there are no spans to strip. It should not be outputting that it's removing what's not there to remove.
Stripspans sends that message whenever it makes any changes to the file. That covers everything from stripping spans to contracting/removing empty elements to de-indenting the <head> section.

If none of that is happening, that's a bug. If any of that is happening, the routine is doing as it should.
Rev. Bob is offline   Reply With Quote
Old 07-20-2014, 09:03 AM   #727
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
Stripspans sends that message whenever it makes any changes to the file. That covers everything from stripping spans to contracting/removing empty elements to de-indenting the <head> section.

If none of that is happening, that's a bug. If any of that is happening, the routine is doing as it should.
Why not have a separate message for the <head> routine and a separate message for the <span> removal? As it is, it looks (to the user) like it's removing spans when in fact, it may not be doing so. It's a false message for something it's not doing (in the case of the report I posted).
JSWolf is offline   Reply With Quote
Old 07-20-2014, 09:56 AM   #728
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: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by JSWolf View Post
Why not have a separate message for the <head> routine and a separate message for the <span> removal? As it is, it looks (to the user) like it's removing spans when in fact, it may not be doing so. It's a false message for something it's not doing (in the case of the report I posted).
If you told it to remove spans and it told you it was removing spans then the message is proper. Whether or not spans exist it was still going through the process of checking and removing any spans that may have been there.
DoctorOhh is offline   Reply With Quote
Old 07-20-2014, 10:02 AM   #729
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,174
Karma: 57532200
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DoctorOhh View Post
If you told it to remove spans and it told you it was removing spans then the message is proper. Whether or not spans exist it was still going through the process of checking and removing any spans that may have been there.
'Cleanup on aisle 5'

Have you ever heard a detailed report on what has been cleaned? (don't ask. Sometimes it is GROSS.)
theducks is offline   Reply With Quote
Old 07-20-2014, 10:11 AM   #730
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DoctorOhh View Post
If you told it to remove spans and it told you it was removing spans then the message is proper. Whether or not spans exist it was still going through the process of checking and removing any spans that may have been there.
Prior to adding the span removal, the plugin never said it was doing something it didn't do. Look at this bit of the output I posted.
Code:
	Looking for files to remove: [u'iTunesMetadata.plist', u'iTunesArtwork']
	Looking for files to remove: [u'META-INF/calibre_bookmarks.txt']
	Looking for files to remove: [u'.DS_Store', u'thumbs.db']
	Looking for unused images
	Looking for broken links in the NCX
	Looking for Adobe xpgt files and links to remove
	Looking for Adobe DRM meta tags to remove
	  Removed meta tag from: OEBPS/HundredThousan_chap-24.html
	  Removed meta tag from: OEBPS/HundredThousan_teas-1.html
Notice that it's not showing doing all of those things I told it to do that it didn't find anything to do. When it found the meta tag to remove, then it said it was ding it and which files it was doing it to. There are no empty spans in the ePub, so the plugin should not be saying that it's removing them. Nor should it be listing which files it's not actually removing spans from.

As it is, telling us it's removing spans when it's not is inconsistent behavior.

Last edited by JSWolf; 07-20-2014 at 10:14 AM.
JSWolf is offline   Reply With Quote
Old 07-20-2014, 03:45 PM   #731
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by JSWolf View Post
Why not have a separate message for the <head> routine and a separate message for the <span> removal? As it is, it looks (to the user) like it's removing spans when in fact, it may not be doing so. It's a false message for something it's not doing (in the case of the report I posted).
So are the files changing or not?

Adjusting the output message is one thing, but you still haven't provided a clear picture of just what the heck is going on.

If the message is getting generated when the file is not changing at all, that's a bug. If you're just quibbling about the content OF the message, then that's a UI issue. So which is it?
Rev. Bob is offline   Reply With Quote
Old 07-20-2014, 08:27 PM   #732
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
So are the files changing or not?

Adjusting the output message is one thing, but you still haven't provided a clear picture of just what the heck is going on.

If the message is getting generated when the file is not changing at all, that's a bug. If you're just quibbling about the content OF the message, then that's a UI issue. So which is it?
The output says it's stripped spans. The ePub has no spans to be stripped. So the output is incorrect.

Code:
	Stripping spans
	  Stripped spans in: OEBPS/HundredThousan_chap-24.html
	  Stripped spans in: OEBPS/HundredThousan_teas-1.html
	  Stripped spans in: OEBPS/HundredThousan_chap-3.html
	  Stripped spans in: OEBPS/HundredThousan_chap-20.html
	  Stripped spans in: OEBPS/HundredThousan_chap-13.html
	  Stripped spans in: OEBPS/HundredThousan_chap-11.html
	  Stripped spans in: OEBPS/HundredThousan_chap-19.html
	  Stripped spans in: OEBPS/HundredThousan_chap-15.html
	  Stripped spans in: OEBPS/HundredThousan_chap-22.html
	  Stripped spans in: OEBPS/HundredThousan_chap-18.html
	  Stripped spans in: OEBPS/HundredThousan_auth-1.html
It lists all the files and there are no empty <span> to be removed.
JSWolf is offline   Reply With Quote
Old 07-20-2014, 09:16 PM   #733
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by JSWolf View Post
The output says it's stripped spans. The ePub has no spans to be stripped. So the output is incorrect.
As I have explained, stripspans performs more cleanup than just removing <span> elements. The "Spans stripped in X" message covers all of that cleanup, not solely the removal of <span> elements.

Now, if you don't want to be helpful, just say so. Otherwise, answer the direct question I asked: Are the files changing or not?

Last edited by Rev. Bob; 07-20-2014 at 09:18 PM.
Rev. Bob is offline   Reply With Quote
Old 07-20-2014, 09:18 PM   #734
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,788
Karma: 27405122
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Suggestion

change Stripped spans in to Looking for [strippable - if that makes sense] spans in
or better yet change Stripped spans in to Stripped n,nnn spans in where n,nnn can be 0.

@Rev. Bob - I use Modify a lot, how would I know if an individual file inside the epub changed unless I open the epub with an archive utility and look at the modify date.

"Stripped" implies something was done - as in "I poured the milk out of the carton into a jug." If the carton was empty, then that wouldn't make sense - would it?

Added : I don't care too much what the messages are - except that if I have a problem then I'm going to read them with a grammarians eye not a computer scientists eye.

BR

Last edited by BetterRed; 07-20-2014 at 09:34 PM.
BetterRed is offline   Reply With Quote
Old 07-20-2014, 09:24 PM   #735
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: 75,347
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
If you don't want to be helpful, just say so. Otherwise, answer the direct question I asked: Are the files changing or not?
When I specify just to remove spans, the files do change as it removes the spaces from the header and the body/html at the end of the files. But the message is misleading as it is not removing any spans and the message states that it is removing spans.

Everything else is mentioned as to what's being asked to be done and if it's done. When stripping spans, if there are no spans to strip, it does say there are spans being stripped. It does not mention at all the header being changed to remove the spaces. So in this case, it's inconsistent. The headers being modified should be a separate output from the stripping spans. This would solve the problem of not being told about the headers and being told about the spans incorrectly.

Last edited by JSWolf; 07-20-2014 at 09:27 PM.
JSWolf is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1197 Yesterday 06:06 AM
[GUI Plugin] Manage Series kiwidude Plugins 167 07-28-2024 03:07 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 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 06:13 AM.


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