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 01-16-2024, 10:11 AM   #61
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 526
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by capink View Post
Enjoy

Can you share what program you used for conversion, and maybe a screenshot of your "Run Command" configuration. @jbacelar was looking for something similar on Windows and could not get it to work. Maybe you configuration will prove useful for him.



Give the attached version a whirl and see if it fixes the problem.
1) The updated plugin has fixed my issue.

2) Please find the two attached images. I use cwebp. However, I have to arrange folders as shown in the image, otherwise the {outputfile} path doesn't match. Maybe you should look into this.

For example, the original path is
Code:
OEBPS/Images/cover.jpg
and the new path from {outputfile} is
Code:
OEBPS/Images\cover.webp
I think this is why it is not working for him.
Attached Thumbnails
Click image for larger version

Name:	cwebp.png
Views:	201
Size:	30.6 KB
ID:	205836   Click image for larger version

Name:	arrange-folder.png
Views:	203
Size:	15.4 KB
ID:	205837  

Last edited by nqk; 01-16-2024 at 10:15 AM.
nqk is offline   Reply With Quote
Old 01-16-2024, 11:58 AM   #62
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by nqk View Post
and the new path from {outputfile} is
Code:
OEBPS/Images\cover.webp
I keep getting burned by Windows OS. I used os.path.join() to join directory name and base name (as I automatically am used to do), and it uses the underlying OS path sep, which on Windows is backslash (cannot for the life of me figure out why they did this). Try the attached test version, hopefully it fixes your issue.

Last edited by capink; 01-17-2024 at 01:33 AM. Reason: remove attatchment
capink is offline   Reply With Quote
Advert
Old 01-16-2024, 04:01 PM   #63
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 526
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by capink View Post
I keep getting burned by Windows OS. I used os.path.join() to join directory name and base name (as I automatically am used to do), and it uses the underlying OS path sep, which on Windows is backslash (cannot for the life of me figure out why they did this). Try the attached test version, hopefully it fixes your issue.
Indeed it works now with the right path of {output file}

Thank you 🙏

Sent from my Pixel 7 using Tapatalk
nqk is offline   Reply With Quote
Old 01-16-2024, 09:55 PM   #64
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 526
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
@capink, I have to correct myself. It works in case the images are in a subfolder. If they are in the root folder (cover.jpg) the new path is added with a forward slash (/cover.webp).

Hopefully your coming version 1.1.4 will clear that bug. You must be hating Windows...

Last edited by nqk; 01-16-2024 at 09:59 PM.
nqk is offline   Reply With Quote
Old 01-17-2024, 01:32 AM   #65
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
OK. Try this one.

Edit: Can you also try when multiple folders e.g. folder1/folder2/cover.jpg

Last edited by capink; 01-20-2024 at 06:47 AM.
capink is offline   Reply With Quote
Advert
Old 01-17-2024, 03:46 AM   #66
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 526
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by capink View Post
OK. Try this one.

Edit: Can you also try when multiple folders e.g. folder1/folder2/cover.jpg
Thank you. It works now with root or multiple folders.

nqk is offline   Reply With Quote
Old 01-18-2024, 05:31 AM   #67
Zillion_
Enthusiast
Zillion_ began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2023
Device: KindleOasis10thGen
Question Feature Request: (Bulk) Rename files

Hello Capink,

may I make a new feature request ?
Would it be possible to add a Rename File(s) action for Editor Chains ?

(I use actions to add/import files such as standard Titles etc. in my book, but have problems when same-name files already exist.
I cannot always overwrite them -- e.g., if I import "Title.html" and a "title.html" already exists, it won't overwrite it, even if the "overwrite" option is selected. In that case I must first use "delete files" to remove Title.html and title.html.
Overwrite does work correctly if the existing file is also called Title.html).

I'd like to be able to e.g. rename "title.html" to "title_old.html" before importing. I also frequently rename files e.g. ".*?c\d+.(x*)html" to "Book-\1.xhtml). Would be nice if there was a Rename files action (with the usual Regex etc. to select files).
And, additionally, to have something like the "Bulk Rename" feature which offers automatic numbering of multiple files being renamed...

If ever you have the time & feel like doing this... :-) thanks
Zillion_ is offline   Reply With Quote
Old 01-18-2024, 02:52 PM   #68
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Zillion_ View Post
(I use actions to add/import files such as standard Titles etc. in my book, but have problems when same-name files already exist.
I cannot always overwrite them -- e.g., if I import "Title.html" and a "title.html" already exists, it won't overwrite it, even if the "overwrite" option is selected. In that case I must first use "delete files" to remove Title.html and title.html.
Overwrite does work correctly if the existing file is also called Title.html).
epub files are case sensitive so that is the natural behavior because these are two different names.

Quote:
Originally Posted by Zillion_ View Post
Would it be possible to add a Rename File(s) action for Editor Chains ?

I'd like to be able to e.g. rename "title.html" to "title_old.html" before importing. I also frequently rename files e.g. ".*?c\d+.(x*)html" to "Book-\1.xhtml). Would be nice if there was a Rename files action (with the usual Regex etc. to select files).
And, additionally, to have something like the "Bulk Rename" feature which offers automatic numbering of multiple files being renamed...

If ever you have the time & feel like doing this... :-) thanks
I've said already that I have plans to write a bulk-rename plugin that can be used from within Editor Chains. It should support regex, numbering, case change ... etc. But this will not be coming anytime soon.
capink is offline   Reply With Quote
Old 01-20-2024, 06:08 AM   #69
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Version 1.1.4

  • Further modifications to Run Command

I've got hold of a Windows machine and was able to test and make modifications to make the following happen:
  • Run batch files.
  • I got ImageMagick to work in Windows using the settings in the attachment. Can be useful for reducing book size. Note that you will need to change the binary to where it is installed on your system.
Attached Thumbnails
Click image for larger version

Name:	run_cmd_final.png
Views:	200
Size:	48.3 KB
ID:	205907  
capink is offline   Reply With Quote
Old 01-20-2024, 01:50 PM   #70
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
It works perfectly.
Thank you so much! capink
jbacelar is offline   Reply With Quote
Old 02-08-2024, 01:05 PM   #71
tamaracks
Connoisseur
tamaracks began at the beginning.
 
tamaracks's Avatar
 
Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
Hello,

How do you get the chains offered for download in this thread into the plugin?
tamaracks is offline   Reply With Quote
Old 02-08-2024, 04:59 PM   #72
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
right click chains dialog > import chain > browse to the zip file
capink is offline   Reply With Quote
Old 02-08-2024, 07:01 PM   #73
tamaracks
Connoisseur
tamaracks began at the beginning.
 
tamaracks's Avatar
 
Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
Quote:
Originally Posted by capink View Post
right click chains dialog > import chain > browse to the zip file
Ah! I knew it was something simple that I was overlooking.

One other question: Is it possible to delete tags with no text inside? Like empty paragraphs or empty spans?

I tried to use Tag Actions with the configurations in the attached images, but it doesn't remove any tags, even ones with nothing inside.

If I should be able to do this, what am I doing wrong?
Attached Thumbnails
Click image for larger version

Name:	CleanShot 2024-02-08 17.55.19@2x.png
Views:	193
Size:	62.4 KB
ID:	206259   Click image for larger version

Name:	CleanShot 2024-02-08 17.55.00@2x.png
Views:	166
Size:	70.9 KB
ID:	206260  
tamaracks is offline   Reply With Quote
Old 02-09-2024, 08:47 AM   #74
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,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
I pushed a fix for this. Try and see how it goes.
capink is offline   Reply With Quote
Old 02-09-2024, 04:10 PM   #75
tamaracks
Connoisseur
tamaracks began at the beginning.
 
tamaracks's Avatar
 
Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
Quote:
Originally Posted by capink View Post
I pushed a fix for this. Try and see how it goes.
That seems to do the trick! Thanks!
tamaracks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] EpubCheck Doitsu Plugins 163 07-23-2024 09:07 AM
[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 07:45 AM.


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