![]() |
#31 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
#32 | |
Dead account. Bye
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Quote:
OTOH How do you manage to get ' correctly modified before decades in number? Because any automated decision you make can be really risky. Last edited by arspr; 08-06-2014 at 12:24 PM. |
|
![]() |
![]() |
#33 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() I'll see if I can't come up with something to scrub the file of UTF8 BOM and additional LF characters before processing. Quote:
![]() I'm not trying to offer up any new, infallible quotation-smartening logic here. All the caveats for algorithmic quotation-smartening still apply. I'm just looking to add more control to WHAT you want to smarten, and to lessen the number of 'tis 'bout and 'cept'n foul-ups, and to do so without affecting any code in the document that doesn't pertain to punctuation being smartened. |
||
![]() |
![]() |
#34 |
Dead account. Bye
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Yes, I've also noticed those EOL rubbish and that is the indirect cause of it. Because of those EOL troubles and duplications, there are in fact BLANK lines in the text which Notepad doesn't show, (which is the software I firstly used and which leads to that buggy file) but Notepad++ does. (I was actually testing it).
And the problem is that if you leave just one single BLANK line in the exception file, (even at the end of it), the plugin fails in that way: every single word is qualified as a contraction... I really think you should filter out blank lines. Test it, just use your .txt and type a return at the end of the file (or in the middle). |
![]() |
![]() |
#35 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I plan to.
But keep in mind that I'm not interested in absolving users of any and all responsibility for providing valid input. If that file gets too hairy, it's getting ignored. ![]() Last edited by DiapDealer; 08-06-2014 at 03:17 PM. |
![]() |
![]() |
#36 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@DiapDealer -- Been playing with the PI a little. Very nice and going to be handy.
Q - in the delete spans, divs, etc. would you consider a little wildcard capability. Nothing like regex, but maybe something simple like ? and * for 1 char and many chars when matching class = " " ? I know the screen shot is a little dumb since "filepos#####" is used for ID's and not classes, but the idea is basically the same Last edited by phossler; 08-06-2014 at 09:15 PM. |
![]() |
![]() |
#37 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
#38 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Posting a somewhat beta-version of the plugin that contains many of the changes discussed.
** NOTE: because of horrible planning on my part, the atrociously named "diaps_editing_toolbag_SpanDivEdit_settings.js on" file in the plugin folder of calibre's configuration directory must be deleted before many of the changes to the Span/Div Editor Tool will appear (for those who have a previous version of the plugin installed). For that, I apologize. The file will not be recreated until I find a better way to handle customization. ** Changes to the Span/Div Editor tool: 1) inclusion of more html elements to delete/modify 2) inclusion of more choices to change those html elements to 3) more attributes to choose from in search criteria 4) the ability to use regex in the search box (Regex is search-only at this point. There is no way currently to use regex captures to build the replacement attribute string when modifying.) Changes to the Smarten Punctuation tool: 1) Makes sure the apostrophe exceptions file is somewhat sanitized before use (mainly makes sure blank lines and UTF-8 BOM doesn't make things barf) Last edited by DiapDealer; 08-09-2014 at 01:19 PM. |
![]() |
![]() |
#39 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
1. Can you put that in less technical language??
![]() 2. Thanks - even the alpha-version of the PI has been very useful to cleanup a number of inefficiently formatted epubs. More than once I've messed up the RegEx doing that manually and had to revert to a previously saved version. The PI is safer AND less work ![]() 3. Keep 'PlugIn-g' away (pun intended) |
![]() |
![]() |
#40 |
Dead account. Bye
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
![]() Noob question with plugins as I cannot find it in the Calibre User Manual: Where is the plugin stored (Calibre in Windows) and therefore its diaps_editing_toolbag_SpanDivEdit_settings.json file? I've searched for it in the Calibre directory (and just for *.json) and I cannot find nothing relevant... |
![]() |
![]() |
#41 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
"<username>/AppData/Roaming/calibre" The plugins (and the json file(s)) are in the 'plugins' sub-directory. You can also find it from within calibre by going to Preferences->Miscellaneous and clicking the "Open calibre configuration directory" button. I apologize for the awkwardness of this solution. I'll try to create a way to reset that file (if it exists) from within the tool itself as soon as I can. |
|
![]() |
![]() |
#42 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Or even a way to edit it from the plugin...
|
![]() |
![]() |
#43 | |
Dead account. Bye
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
|
Quote:
![]() I've deleted both .json files and installed your new version. Although I suppose you've already tested it, as I was the culprit, I'll also test the bogus exception file ASAP. Another side comment, the more I think about it the more awkward it seems. When the tools have an explicit dialog window why don't you move the "current file/entire book" option to that dialog? Having two look for tool options in two places seems a bit un-userfriendly IMO. Last edited by arspr; 08-12-2014 at 04:08 PM. |
|
![]() |
![]() |
#44 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
#45 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Heaven help us.
![]() Look on the same menu where we choose the "current file/entire book" scope. Last edited by DiapDealer; 08-12-2014 at 07:18 PM. |
![]() |
![]() |
|
![]() |
||||
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 |