Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2023, 12:40 AM   #1
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
(Help) command line usage to remove fonts

I have thousands of ebooks that must have their embedded fonts wiped out altogether. So I installed calibre and modify epub plugin, to speed up the wiping process.

I already had "Remove embedded fonts" option checked and unchecked all the others in the plugin settings dialog.

But I am stuck in command line prompt.

https://manual.calibre-ebook.com/gen...cli-index.html
https://manual.calibre-ebook.com/gen...bre-debug.html
I read these tutorials first but it's not too newbie friendly and I have no clue where to start. So, it would be very helpful if any of you get me on the right direction.


For example, I am about to remove embedded fonts from all the epub files that are located at "C:\Users\JohnDoe\epub files\" including its subfolders "C:\Users\JohnDoe\epub files\foldername1" "C:\Users\JohnDoe\epub files\foldername2"... etc. and I want all the newly made fonts-free epub files to move to the new folder ""C:\Users\JohnDoe\new epub files" keeping the same file name and subfolder structures, with the original files unscathed.

Adding the books first in the GUI library isn't the option because I am not using calibre as my ebook management application. I prefer to use windows explorer to locate and open the file with the viewer of my choice.

Step by step guide would be very much appreciated.

Thank you.

Last edited by tatagi; 01-04-2023 at 12:52 AM.
tatagi is offline   Reply With Quote
Old 01-04-2023, 03:10 AM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by tatagi View Post
I have thousands of ebooks that must have their embedded fonts wiped out altogether. So I installed calibre and modify epub plugin, to speed up the wiping process.

I already had "Remove embedded fonts" option checked and unchecked all the others in the plugin settings dialog.

But I am stuck in command line prompt.

https://manual.calibre-ebook.com/gen...cli-index.html
https://manual.calibre-ebook.com/gen...bre-debug.html
I read these tutorials first but it's not too newbie friendly and I have no clue where to start. So, it would be very helpful if any of you get me on the right direction.


For example, I am about to remove embedded fonts from all the epub files that are located at "C:\Users\JohnDoe\epub files\" including its subfolders "C:\Users\JohnDoe\epub files\foldername1" "C:\Users\JohnDoe\epub files\foldername2"... etc. and I want all the newly made fonts-free epub files to move to the new folder ""C:\Users\JohnDoe\new epub files" keeping the same file name and subfolder structures, with the original files unscathed.

Adding the books first in the GUI library isn't the option because I am not using calibre as my ebook management application. I prefer to use windows explorer to locate and open the file with the viewer of my choice.

Step by step guide would be very much appreciated.

Thank you.
Hi,

From a quick look in Modify Epub wiki, as well as in file me.py contained in the plugin package I see that you would need to:

1) Unpack the plugin, go to the subdirectory commandline
2) Open a command prompt in that folder and then run calibre-debug -e me.py "input_epub_path" ["output_epub_path"] --remove_embedded_fonts

I suggest you create a spreadsheet with columns for each command bit, and then assemble a .bat script.

There are tools for Windows that can help you copy the epub filenames and paste them in one of those columns...
Comfy.n is offline   Reply With Quote
Advert
Old 01-04-2023, 04:18 AM   #3
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by Comfy.n View Post
Hi,

From a quick look in Modify Epub wiki, as well as in file me.py contained in the plugin package I see that you would need to:

1) Unpack the plugin, go to the subdirectory commandline
2) Open a command prompt in that folder and then run calibre-debug -e me.py "input_epub_path" ["output_epub_path"] --remove_embedded_fonts

I suggest you create a spreadsheet with columns for each command bit, and then assemble a .bat script.

There are tools for Windows that can help you copy the epub filenames and paste them in one of those columns...

Hi there!
Thank you for the insight.
I wish I could choose not to add books in the library, which might ease the pain to learn script languages I know nothing about.

I thought there's easier way to do that by specifying the name of folders where the files are saved to make the script in just a few lines haha
tatagi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Command-line] Easy way to remove DRM on Linux? Shohreh Library Management 12 06-10-2022 10:54 AM
Calibre-web command line usage MontyJ Related Tools 4 10-02-2021 07:24 PM
HTML to MOBI via command line: Can't remove left and right page margins otw-adt Conversion 11 08-22-2018 01:20 PM
"Remove the dependency on the zip command line tool when developing plugins"? JimmXinu Plugins 2 07-13-2012 02:09 PM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM


All times are GMT -4. The time now is 10:20 AM.


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