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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-17-2015, 09:59 PM   #31
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
FYI, You can simply use a double ampersand.
kovidgoyal is offline   Reply With Quote
Old 04-20-2015, 05:05 PM   #32
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: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
@Terisa

Try this version of the tools and see if it's to your liking.
  • Fixed the cosmetic menu issue
  • Added "section" to list of tags
  • Added ability to bypass diff generation
  • Arranged so dialogs retain their dimensions when resized (thanks Kovid!)
  • Tiny tweak to plugin-ized smartypants
  • Various things tidied up

The zip file is much larger because I'm creating it with no compression. Otherwise, the overall size of the uncompressed files actually got smaller from v0.3.0.

Let me know. If nothing got broken, I'll update the first post with 0.3.1 sometime.

EDIT: first post updated with the test version that used to be here. Attachment removed from this post.

Last edited by DiapDealer; 04-24-2015 at 02:27 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 04-21-2015, 12:27 AM   #33
Terisa de morgan
Grand Sorcerer
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: 6,227
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much @DiapDealer, it's exactly what I wanted. And the section tag will come in handy because I've already found some books with it.

Last edited by Terisa de morgan; 04-21-2015 at 09:47 AM. Reason: Typo
Terisa de morgan is offline   Reply With Quote
Old 04-21-2015, 08:24 AM   #34
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: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Good to know!

Let me know if anything wonky happens. If I don't hear anything (and nothing turns up from my testing) I'll update the first post.

I've found the section tag comes in handy when downgrading commercial EPUB3s to EPUB2 (when there's no particular advantage for them being EPUB3).
DiapDealer is offline   Reply With Quote
Old 04-21-2015, 09:48 AM   #35
Terisa de morgan
Grand Sorcerer
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: 6,227
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by DiapDealer View Post
Good to know!

Let me know if anything wonky happens. If I don't hear anything (and nothing turns up from my testing) I'll update the first post.

I've found the section tag comes in handy when downgrading commercial EPUB3s to EPUB2 (when there's no particular advantage for them being EPUB3).
I've found a couple of them just this weekend. And It's of no interest to me.
Terisa de morgan is offline   Reply With Quote
Advert
Old 04-24-2015, 02:29 PM   #36
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: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Version 0.3.1 of the plugin released (see first post in thread).

Changes:
  • Fixed a cosmetic menu issue (Span/Div editor)
  • Added "section" to list of tags (Span/Div editor)
  • Added ability to bypass diff generation (all tools)
  • Arranged so dialogs retain their dimensions when resized (all tools)
  • Tiny tweak to plugin-ized smartypants (Smarten Punctuation)
  • Various things tidied up
DiapDealer is offline   Reply With Quote
Old 04-24-2015, 08:18 PM   #37
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Another (small) request

Small request to please consider

For something like this ...


Code:
<p class="ct">ONE<br/><br/><i>Story Begins</i><br/> Monday</p>
... I'd like to be able to use

Action Type = Modify
Tag Name = p
Attribute = class
Value= ct
Change Tag to: H1, or H2, etc.

... to end with ...

Code:
<h1>ONE<br/><br/><i>Story Begins</i><br/> Monday</h1>
I thought that customization would allow me at add, but guess not

I could probably come up with a RE, but your PI is so much easier to use

Thanks for considering
phossler is offline   Reply With Quote
Old 04-24-2015, 08:45 PM   #38
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: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Non-nestable tags are fairly trivial to modify with normal search and replace tools. My main goal was to provide something for those areas where regex couldn't be trusted--the tags that got me in trouble when replacing/changing/deleting.

I'll keep it in mind, but I'm not really interested in creating something where any tag can be changed to any other tag. That would likely get me back in trouble again.

Find: <p class="ct">(.*?)</p>
Replace: <h2>\1</h2>

Last edited by DiapDealer; 04-24-2015 at 08:47 PM.
DiapDealer is offline   Reply With Quote
Old 04-24-2015, 09:14 PM   #39
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
NP -- I ending up using a RE to move along.

It just seemed to fit nicely into the PI's structure


BTW -- is "•Added ability to bypass diff generation (all tools)" an option? If so, where is it stored?

Thanks again for a very useful PI
phossler is offline   Reply With Quote
Old 04-24-2015, 09:36 PM   #40
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: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by phossler View Post
BTW -- is "•Added ability to bypass diff generation (all tools)" an option? If so, where is it stored?
It's not stored anywhere. After the plugin runs, you have the option of generating/viewing the changes ("See the changes") or skipping the diff generation altogether ("Close"). Basically the same as when running one of the calibre editor's built-in tools. There was no choice in the previous version of the plugin. If every file was modified, you had to wait for all the diffs to generate before you could move on.

The plugin always creates a checkpoint, so even if you skip viewing the diffs, you can still revert the changes.
DiapDealer is offline   Reply With Quote
Old 04-25-2015, 06:52 AM   #41
loximuthal
Connoisseur
loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.
 
loximuthal's Avatar
 
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
Quote:
Originally Posted by phossler View Post
Code:
<p class="ct">ONE<br/><br/><i>Story Begins</i><br/> Monday</p>
<snip>
... to end with ...
Code:
<h1>ONE<br/><br/><i>Story Begins</i><br/> Monday</h1>
You can do this now, albeit one at a time. Just place your cursor somewhere in the middle of the paragraph and press CMD/CTR+1 (the "Change Paragraph to Heading" tool in the Tools for HTML Editors toolbar at the top of the main editor window).
loximuthal is offline   Reply With Quote
Old 04-28-2015, 07:09 PM   #42
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@loximuthal -- thanks, but the book I was trying to clean/fix/correct/make my way had 50+ of those and I just wanted a simple TOC from Headings

I ended up using a RE; it was just that it was specific to the special class, etc that was used
phossler is offline   Reply With Quote
Old 07-06-2015, 02:05 PM   #43
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
Hi DiapDealer,

Your plugin is great, except that it is changing in just the current file, not all of the files. What am I doing wrong?

Keith
kcarscadden is offline   Reply With Quote
Old 07-06-2015, 02:11 PM   #44
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kcarscadden View Post
Your plugin is great, except that it is changing in just the current file, not all of the files. What am I doing wrong?
If you've added the plugin to your Toolbar you should see a small down-arrow to the right of the icon. 'Edit current file only' is an option in there - uncheck it.
jackie_w is offline   Reply With Quote
Old 07-07-2015, 01:23 PM   #45
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
Thanks Jackie. That certainly does the trick.


Keith
kcarscadden 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
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 07:16 AM
Diaps Editing Toolbag.zip Index Error phossler Editor 2 10-01-2014 08:05 PM
Editor plugin question DiapDealer Development 2 07-28-2014 10:23 PM
japi - a text editor capable of editing ePub directly hekkel ePub 5 02-20-2009 08:46 AM


All times are GMT -4. The time now is 07:03 PM.


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