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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2014, 12:15 PM   #46
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 323
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
v0.3.0 even more better

Can you make the settings persistent between uses so the user does not have to re-select the same options for subsequent re-runs?
phossler is offline   Reply With Quote
Old 08-13-2014, 12:53 PM   #47
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I could, I suppose, if it would really be considered helpful. I just figured it would be pretty rare that the exact same settings as the previous run would save much in the way of time preparing for a new run. You've either deleted or modified what you looked for last time, right?

Are you talking persisting everything? Including search/replacement strings? Or just mainly the action-type, element-type, attribute name (and maybe the regex check box)?

Part of the problem is all the dynamic stuff that changes depending on what's chosen in other boxes. It's much easier to control all that when the dialog is launched from the same point each time. It wouldn't be impossible by any means though.

EDIT: I neglected to think about the situation where someone might want to use the exact same criteria, but then apply that criteria one file-at-a-time for safety/testing purposes. That would certainly come in handy. It's just that I'm more of an "I've-got-backups-and-checkpoints-set-so-let's-let-'er-rip" kind of guy.

Last edited by DiapDealer; 08-13-2014 at 01:51 PM.
DiapDealer is online now   Reply With Quote
Old 08-13-2014, 02:01 PM   #48
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 323
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
No biggie either way

So far the most use seems to be removing dead <span>s after replacing a lot of

class = "txt1", etc

with nothing

It's nice to use your PI to remove the dead <span> tags and then work with a slightly cleaner version to attack the next group of unneeded css.

I was think to just 'remember' the previous action, and any from/to values

Just a thought

So far, it works great and is a real time saver
phossler is offline   Reply With Quote
Old 08-14-2014, 05:52 AM   #49
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 2,280
Karma: 1982066
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Mini, iPhone, iPad, Kobo Aura, Galaxy Tab3 8
@DiapDealer, thank you very much for the plugin and the updates, it works great.
Terisa de morgan is offline   Reply With Quote
Old 08-14-2014, 08:13 AM   #50
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're welcome. Glad you find it useful.
DiapDealer is online now   Reply With Quote
Old 08-14-2014, 09:45 AM   #51
arspr
None
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 406
Karma: 245000
Join Date: Mar 2011
Location: Madrid, Spain
Device: Sony PRS-650 >>> Kobo Aura HD
Quote:
Originally Posted by DiapDealer View Post
Because many of the tools I will be using won't have any explicit dialogs, and I'd rather the "current file/entire book" option remain in a consistent location across all tools I may publish/use. I don't really consider it "two different places" myself. All actions for each tool are available from a single icon/menu: Run (including any run options), Set Scope, and--eventually--Customization. Scope and Customization will tend to persist from session to session. Most Run options (with some exceptions like Smarten) will likely need to be chosen each time they're run.
Good point too. So what about the middle solution?: duplicate its location. As this "option" is general to many tools, having it in the very same place for them all is good. But as it is just another tool "option", it's also expected to be in the very same place all those tool options appear.


BTW. As expected, buggy exception files work fine.

BTW2. I haven't said it yet but it's obvious, really really useful tool, which saves a lot of Regex time and further polishes the Smarten punctuation tool...
arspr is offline   Reply With Quote
Old 08-14-2014, 11:17 AM   #52
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 323
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
@DiapDealer -- REALLY liking the PI the more I use it

Question / Suggestion -- How about a feature to remove 'dead' ID's? I.E. an ID that is not linked from either the CSS or in the text? A lot of epubs that I clean/reformat have ID's on darn near everthing. An overly enthusistic RegEx would delete the few that are actually used, so now if I want to clean up, I have to do it almost one at a time


Question / Suggestion -- How about a feature to remove 'dead' <a>'s? I.E. an <a> that links to a nonexistant ID? [Check Book] flags them and I can fix the ones that need to be fixed, but I haven't found an easy way to just delete to one that I didn't fix because I didn't need them

Last edited by phossler; 08-14-2014 at 11:19 AM.
phossler is offline   Reply With Quote
Old 08-14-2014, 11:34 AM   #53
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Definitely something I will consider for future versions, but it will take some different logic and additional parsing routines. My current parser is pretty "dumb": it deletes/modifies tags as it encounters them. One time through the file and done. IDs/links would need to checked against other files (often all or many) to determine whether or not they were being used. In the case of ids, if would be checking all (x)HTMl, all css, as well as the opf/ncx files for each ID encountered to determine if it was unused or not.
DiapDealer is online now   Reply With Quote
Old 08-16-2014, 09:32 AM   #54
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 323
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
PI works great


Downloaded a RTF, converted to epub and opened in editor

Had to do a lot of onesie-twosie conversion since I couldn't be sure if there were significant (i.e. anything I cared about) formatting differences and Calibre conversion can be a little over enthusiastic about creating many different classes, even for 'normal' text in the same paragraph

I don't start with a RTF or DOC/DOTX very often, but I'm going to experiment with options just in case. Toxaris has a Word macro that I want to investigate further also to see if it will give me a better starting point

Still without a doubt the PI was a huge time saver

Most of the stuff I reformat is for personal use on my kindle, so I tend to go with minimal formatting and maximum readability.


Spoiler:

<body class="calibre">

<div class="WordSection">

<span class="calibre38"><br clear="all" class="calibre39" id="calibre_pb_2"/>
</span>

<p class="MsoNormal20">*</p>

<p class="MsoNormal20">*</p>

<p class="MsoNormal20">*</p>

<p class="MsoNormal20"><b class="calibre1"><span class="calibre42">1</span></b></p>

<p class="MsoNormal20">*</p>

<p class="MsoNormal21"><span class="calibre43">"</span><span class="calibre44">R</span><span class="calibre43">ICH, GET </span><span class="calibre44">J</span><span class="calibre43">OSEPHSON</span><span class="calibre44"> on the phone, tell him to </span><span class="calibre45">come down here."</span></p>

<p class="MsoNormal21"><span class="calibre35">"Okay. Hang on a second." Rich finished load</span><span class="calibre31">ing a pack on a 2314
disc file and walked out to the </span><span class="calibre35">control area.</span></p>

<p class="MsoNormal21"><span class="calibre37">"Use your phone Judy?" Without waiting for </span><span class="calibre45">the chubby lady's
response, he dialed the two-</span><span class="calibre36">digit extension for Armand Josephson.</span></p>

<p class="MsoNormal21"><span class="calibre36">"Josephson."</span></p>

Last edited by phossler; 08-16-2014 at 09:38 AM.
phossler is offline   Reply With Quote
Old 08-16-2014, 10:36 AM   #55
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by phossler View Post
Toxaris has a Word macro that I want to investigate further also to see if it will give me a better starting point
Pssst. It is an add-in, not a macro. Most of it cannot be done in a macro.
Toxaris is offline   Reply With Quote
Old 08-16-2014, 10:50 AM   #56
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
And that Word add-in works very well, I might add.
DiapDealer is online now   Reply With Quote
Old 08-16-2014, 10:54 AM   #57
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 323
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
@Toxaris --


Quote:
Pssst. It is an add-in, not a macro. Most of it cannot be done in a macro.
Thanks for the reference to the add-in

However, I was going by a link I had saved (which is still in your Sig BTW)

Quote:
Creator and maintainer of the Clean HTML macro for MS Word.

http://www.mobileread.com/forums/sho...d.php?t=142530

Quote:
Word macro for clean HTML code

If anybody is interested, I created a macro to transform a Word document to clean HTML. The following things are supported:
and using transform_html 2.8_eng.bas it gets installed into Normal.Dotx

Should I use the addin instead??

Edit -- Yep, Add-in is MUCH nicer, but does it still do the cleaning?

Last edited by phossler; 08-16-2014 at 01:01 PM.
phossler is offline   Reply With Quote
Old 08-16-2014, 03:10 PM   #58
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,002
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by phossler View Post
Edit -- Yep, Add-in is MUCH nicer, but does it still do the cleaning?
Originally only the macro was there. Later I converted some macro's I had into an add-in. I just keep on adding functionality to the add-in that might be useful. Some of the ideas come from me, but others have also contributed ideas which I try to incorporate.
The HTML macro was the core for the HTML conversion in the add-in. However, about a year ago (I think...) I completely rewrote that part, making it a whole lot faster. The result is still perfectly clean and it works much better.
As some here can testify, there are some gems in the add-in. My personal favorite is the 'check dialogue' that actually check if the opening quotes also have a closing quote and vice versa. It takes apostrophes into account and the different quotes used in different countries. You can actually select the system used in your country/book via the settings. I quite regularly find missing quotes that are also missing in the original print.

Well, back to the topic at hand!
Toxaris is offline   Reply With Quote
Old 08-20-2014, 01:53 PM   #59
AlanHK
Enthusiast
AlanHK began at the beginning.
 
AlanHK's Avatar
 
Posts: 32
Karma: 10
Join Date: Apr 2014
Device: Android phone
Quote:
Originally Posted by DiapDealer View Post
In the spirit of getting some more Editor Plugin action happening, I'm attaching a plugin that has three different tools. All three can be set to run on the currently opened file or to run book-wide.
Just the kind of tool I want.

Can I suggest you update the initial post with the latest version?
AlanHK is offline   Reply With Quote
Old 08-20-2014, 02:00 PM   #60
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,251
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AlanHK View Post
Just the kind of tool I want.

Can I suggest you update the initial post with the latest version?
Excellent idea.
DiapDealer is online now   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
Editor plugin question DiapDealer Development 2 07-28-2014 10:23 PM
Editor: ToC Editor: Start entry macnab69 Editor 2 06-25-2014 11:15 AM
Book Editor TOC Editor Isue? weberr Editor 2 04-17-2014 11:13 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 09:28 PM.


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