Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2025, 02:58 PM   #106
nephtys59
Enthusiast
nephtys59 began at the beginning.
 
nephtys59's Avatar
 
Posts: 33
Karma: 10
Join Date: Feb 2011
Device: Android Tablet
Quote:
Originally Posted by theducks View Post
Is this an Editor saved search?
Even if you did a change, just abort (Exit without save).
I really want to test out most complex S&R over more than 1 case.

BUT ....

You can just fill out the S&R box . Right-click in the FIND box: Save current search
I have 2 saved searches in the editor. They are complex and I need them to find some special things. But the replacement is manual, I use them only to search. I'd like to use them with editor chains, so with just one click I make both searches, but don't want anything to be replaced. How do I set editor chains to just find an do nothing else? If there is a way ...
nephtys59 is offline   Reply With Quote
Old 06-17-2025, 06:36 PM   #107
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,356
Karma: 62500000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by nephtys59 View Post
I have 2 saved searches in the editor. They are complex and I need them to find some special things. But the replacement is manual, I use them only to search. I'd like to use them with editor chains, so with just one click I make both searches, but don't want anything to be replaced. How do I set editor chains to just find an do nothing else? If there is a way ...
Sorry, but that makes little sense (as a 1 click)
FIND search1, But don't pause or replace.
FIND search2, But don't pause or replace.

A simple search for 1 of multiple values: [red!black] , but again, Editor chains is for an AUTOMATED task and you want a STOP for manual
theducks is offline   Reply With Quote
Old 12-11-2025, 08:30 AM   #108
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
New action request

Hi,
Thanks for all your work.
I would like to request an additional action.

Remove all fonts.
I do not use any of the fonts in a book and rely on the font I select on my reading device.
Just a help in the cleanup.

skil-phil is offline   Reply With Quote
Old 12-11-2025, 11:45 AM   #109
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,356
Karma: 62500000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It is a conversion option: (at the bottom)

On the Styling tab

or
Preferences: Common Options: if you want it as the default
Attached Thumbnails
Click image for larger version

Name:	NoFont.JPG
Views:	13
Size:	63.9 KB
ID:	219687  
theducks is offline   Reply With Quote
Old Yesterday, 01:22 AM   #110
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Thanks for the tip.
Didn't work for me though.
Tried adding an epub- still there.
Converted epub to epub - still there.
Will try some more. Maybe there is another setting somewhere.

Last edited by skil-phil; Yesterday at 01:58 AM. Reason: Spelling
skil-phil is offline   Reply With Quote
Old Yesterday, 01:36 AM   #111
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Found it does remove fonts that are not imbedded.
Imbedded fonts remain. Now to try to automate unembeding them.
Thanks

Last edited by skil-phil; Yesterday at 01:58 AM.
skil-phil is offline   Reply With Quote
Old Yesterday, 05:27 AM   #112
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,218
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
The plugin has a generic "Remove files" action. It supports regex, so you can use it to remove fonts with this regex

Code:
(?i).+\.(otf|ttf)$
You can then use a S&R action to remove @font-face from style files.

Attached below is a sample chain. Please test and verify before saving your books.
Attached Files
File Type: zip remove_fonts.zip (504 Bytes, 1 views)
capink is offline   Reply With Quote
Old Yesterday, 06:11 AM   #113
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Thanks capink,
That worked and removed them from the file browser.
They still show in the manage fonts dialogue though.
Is this a problem? Can I just ignore it?
Thanks
skil-phil is offline   Reply With Quote
Old Yesterday, 07:02 AM   #114
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,218
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Manage font dialog will show any font referenced in any CSS rule, with the embedded font having a "✓" sign next to it, as opposed to non embedded fonts. If you want to delete all fonts and all references to them as done in the Manage fonts dialog, you can use this custom action which is based on the remove fonts functionality in "Manage fonts dialog":

Code:
from calibre.ebooks.oeb.polish.fonts import change_font, font_family_data

from calibre_plugins.editor_chains.actions.base import EditorAction

class RemoveAllFonts(EditorAction):

    name = 'Remove All Fonts'
    headless = True

    def run(self, chain, settings, *args, **kwargs):
        container = chain.current_container
        font_data = font_family_data(container)
        for font in font_data.keys():
            change_font(container, font)

    def validate(self, settings):
        return True
You can add the custom action by clicking on Editor Chains menu > Manage Modules > add > copy/paste.

Note: Using the above method, you will lose all the font formatting even if the font is installed on your device, as the function deletes all font-family properties from the epub. This apply to previously embedded as well as non-embedded fonts.

Last edited by capink; Yesterday at 07:09 AM.
capink is offline   Reply With Quote
Old Yesterday, 07:27 AM   #115
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Thank you.
All good now.
Your hard work certainly makes life easier for users.
Cheers.
skil-phil is offline   Reply With Quote
Old Today, 02:40 AM   #116
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 90
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Hi,
I also found that I needed to add the following to
the Remove all fonts chain.

Search and replace "font-family: (.*?);" with "" in All Style Files.

Cheers
skil-phil is offline   Reply With Quote
Old Today, 10:55 AM   #117
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,356
Karma: 62500000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by skil-phil View Post
Hi,
I also found that I needed to add the following to
the Remove all fonts chain.

Search and replace "font-family: (.*?);" with "" in All Style Files.

Cheers
Just delete the line. "" trigger an error on a validate (""; might slide)
Calibre (editor debug) will issues a warning if no generic font is declared in a "font-family"
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] EpubCheck Doitsu Plugins 220 11-09-2025 06:12 PM
[Editor Plugin] LanguageTool Doitsu Plugins 17 04-20-2024 03:21 PM
[Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor thiago.eec Development 7 01-09-2019 09:05 PM
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 08:16 AM
Editor plugin question DiapDealer Development 2 07-28-2014 11:23 PM


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


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