|
|
Thread Tools | Search this Thread |
10-23-2021, 01:44 PM | #1 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Aug 2020
Device: Tablet
|
Delete Images in preview window / external script to customize code / shortcut
Hi,
at the moment i edit a very complex ebook that was created from abbyy finereader from a scanned book. the ebook contains a lot of images and sometimes i have to replace or delete an image. i can do this in the file browser with a right click on the image and delete or replace or export the image. its a lot of scrolling when i have more then 20 xhtml or image files. is there a way to have the same options directly when i right click on the image in the preview? here i can open an image with an external program but i miss the other options. also deleting the code (<img src=....>) would be interesting. sometimes abbyy finereader makes the same terrible sh*t every time with the same kind of content (e.g. tables or lists). i have scripted some little shell scripts with a little bit search&replace that creates clear code. i would be helpful if i could highlight a part of the code, right click, "run external script" and copy back what the output of the script is. and last: can i create a shortcut for a regularly used tag (in my case figcaption)? |
10-23-2021, 02:21 PM | #2 |
Well trained by Cats
Posts: 30,456
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Clicking in Preview synchronizes Code view to the line.
Delete that line. That deletes the USAGE At the end, Run tools:reports:Image files; Those with 0 are not used You can delete the ACTUAL Image from there |
Advert | |
|
10-23-2021, 02:36 PM | #3 | |
Zealot
Posts: 148
Karma: 1451628
Join Date: Jul 2021
Device: N/A
|
Quote:
You have also a button "insert a tag" in the page's toolbar. |
|
11-02-2021, 07:40 AM | #4 | |
Enthusiast
Posts: 32
Karma: 10
Join Date: Aug 2020
Device: Tablet
|
i can add a tag to the button but not insert a tag using a shortcut, e.g. ALT+F for 'figcaption'?
Quote:
Code:
<img .../> <p>text</p> Code:
<figure> <img .../> <figcaption> <p class="caption">text</p> </figcaption> </figure> there is a plugin called "Action Chains" and i've installed it. but i can't find it in the calibre editor? the plugin only works in the normal calibre GUI not in the calibre editor? |
|
11-02-2021, 11:44 AM | #5 |
Well trained by Cats
Posts: 30,456
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
*assumed* follows
That the IMG tag is always followed by a caption (p tag) (BTW I don't think a naked <img is allowed) I wrapped it in a basic div REGEX (saved search if you intend to use again) Simply search Code:
(<img .+?</img>)\s+<p>(.+?)</p> Code:
<figure> <div>\1</div> <figcaption> <p class="caption">\2</p> </figcaption> </figure> |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
4.20 Code window and preview not syncing | JSWolf | Editor | 7 | 07-07-2020 06:44 PM |
KUAL: Shortcut to run script in myts | aswanson | Kindle Developer's Corner | 2 | 05-11-2018 07:35 PM |
Replace/customize keyboard shortcut? | eosrose | Calibre | 2 | 11-10-2011 08:17 PM |
How do I get a shortcut for a Python script onto the taskbar in W7? | Sydney's Mom | Workshop | 6 | 03-28-2010 09:11 PM |
Could you make a script for changing button shortcut for me? | harpum | iRex | 42 | 07-13-2008 03:00 AM |