![]() |
#736 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
BR:
Before I make changes, I have to properly diagnose the problem. That's why I explained the distinction between the two types of issues and requested clarification. If it's an actual bug, that's a very serious matter and I need to see why the program isn't working properly. That is - and must be - my top priority. If it's just a quibble about the output message, then that's an entirely different story. I don't worry about polishing that chrome until I'm sure the engine's running properly; there's no point. If this is really such an unimaginably vital issue - if the people in this development forum are truly incapable of testing a beta without reading "Stripped spans in X" and understanding that it means "The stripspans routine made changes to X" - then I don't know what to say. For now, wording tweaks are the least of my worries; proper handling of the EPUB does and must take precedence over what the log message says. |
![]() |
![]() |
![]() |
#737 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Why couldn't you just say that the first time I asked for clarification? |
|
![]() |
![]() |
Advert | |
|
![]() |
#738 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,786
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#739 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
That's one way. Another is to look at the contents of an individual file before and after running the plugin. By design, stripspans makes changes that should not affect what you see when you read the book; unless something goes very wrong, you'll have to dig into the archive to detect those changes.
|
![]() |
![]() |
![]() |
#740 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,786
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#741 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
...is a "yes" or "no" question, to which you responded: Quote:
A: My computer won't turn on. B: Is it plugged in? A: It won't turn on. When a programmer or diagnostician asks a strictly binary question, nonbinary answers do not help. They may frustrate, obscure, and confuse, but the one thing they do not do is help. |
||
![]() |
![]() |
![]() |
#742 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Quote:
For someone as hungry for a finished version of this as you seem to be, you have an odd way of showing it. It seems more like you want me to walk away in disgust and forget the whole thing. |
||
![]() |
![]() |
![]() |
#743 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,786
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What I want is the proper output messages. Saying spans are being stripped does not work when no spans are being stripped. Saying the header is being modified when it is works much better.
|
![]() |
![]() |
![]() |
#744 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Is a certain popular song from the movie Frozen running through anyone else's mind?
|
![]() |
![]() |
![]() |
#745 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
In fact, I've broken the de-indent bit out into its own little new option, so it's not in stripspans at all any more. Stripspans still contracts and removes empty formatting elements, so <b/> and <i></i> go away, but you know what? "Stripped spans in X" seems to me like a fine way to cover that functionality in addition to the strict removal of <span> elements. If you don't like it, deal with it until we're sure all the bugs are worked out, then feel free to suggest an alternate wording if you like. As I've said before, let's worry about getting the engine running correctly before polishing the chrome. The new "de-indent" option is --unpretty (since it's the opposite of calibre's Beautify HTML in many ways), and it does the following: - Removes tabs and other whitespace before HTML lines. - Adds newlines after block-level elements. - Adds a second newline after P, OL, UL, and H1-H6 elements. In other words, it "straightens up" HTML, but without all the bloody indents. Note that this operation is not safe for files containing PRE elements, so the plugin skips any such file (and says so). The one thing that it doesn't do that I'd like to add is an "unwrap paragraphs" feature, which would remove linefeeds within paragraphs, but that winds up being a bit complicated for a quick afternoon fix. EDIT, 7pm EDT: The unpretty algorithm has been updated. Nothing in stripspans or stripkobo has changed from the 5:20pm version. Last edited by Rev. Bob; 07-21-2014 at 07:06 PM. |
|
![]() |
![]() |
![]() |
#746 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I have had a play and it is working well. Strangely, I find I like the un-pretty option. And it doesn't do any real harm as I can press the pretty button in the editor if I need to.
I did notice one problem with it. Sometimes the first tag after the body was still indented. Mostly this was a h2, but I did find a paragraph as well. Another thing that occurred to me was what if someone added a style for "span"? This would be used for classless spans. Removing them would lose formatting. Of course, it would be a stupid thing to do. I style p and the heading tags directly, but a span or div would be a bad idea. The only other thing is that the dialog is unbalanced. I had a play, but I couldn't come up with a layout I was completely happy with. I did make changes to dialog.py to make fiddling with this easier. I'll send you a link to this so you can try. |
![]() |
![]() |
![]() |
#747 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#748 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I have attached tow examples. "Last Line of screen 1 - David Forrester.epub" is a single chapter that has a pile of paragraphs. The other has several chapters with different heading levels as the first tag inside the body. In both, the first tag is still indented.
Quote:
|
|
![]() |
![]() |
![]() |
#749 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Just in case the error's on my side - maybe the reupload mixed something up - here's the correct, up-to-date beta. Edit: Removed this now-outdated beta; see below. Last edited by Rev. Bob; 07-22-2014 at 06:39 PM. |
|
![]() |
![]() |
![]() |
#750 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
Found a glitch in the stripkobo routine that I thought I'd already patched, but it led me to a more robust fix anyway. The attached file includes that fix and the earlier updates to the unpretty routine.
Edit: Another couple of hours, another revision. See post 752 below. Last edited by Rev. Bob; 07-22-2014 at 09:02 PM. |
![]() |
![]() |
![]() |
Tags |
modify epub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1251 | 07-07-2025 09:13 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM |
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 |