Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2023, 03:53 PM   #16
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
It is not such a difficult nut to crack.

The plugin has one imperfection that I don't want to correct: image file names must not contain spaces.
Attached Files
File Type: zip AddDimensionsOfImages_v0.0.1.zip (2.3 KB, 102 views)
BeckyEbook is offline   Reply With Quote
Old 09-13-2023, 03:59 PM   #17
Elvys
Member
Elvys began at the beginning.
 
Elvys's Avatar
 
Posts: 17
Karma: 10
Join Date: Sep 2021
Location: Spain
Device: Kobo Sage
Quote:
Originally Posted by BeckyEbook View Post
It is not such a difficult nut to crack.

The plugin has one imperfection that I don't want to correct: image file names must not contain spaces.
That is exactly what I was looking for!!
Did you code it yourself?

Thanks a lot!!
Elvys is offline   Reply With Quote
Advert
Old 09-13-2023, 04:15 PM   #18
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
If you have the height, you could try and figure out how tall each "line" is, then make a series of classes like:

Code:
.img-2-lines {
height: 2em;
max-width:100%;
max-height:100%;
object-fit:contain;
}

.img-3-lines {
height: 3em;
max-width:100%;
max-height:100%;
object-fit:contain;
}

(etc.)
Then do a find & replace like:

Code:
Find: <p><img width="\d+" height="3\d+" src="(.*?)"/></p>
Replace: <p style="text-align:center;"><img class="img-3-lines" src="\1"/></p>
You'd have to "dial in" the height value as I doubt you'd have it so that each line would be roughly 100px. Also, if any of the images have whitespace around it you'd have to deal with that as well.

But as everyone is saying, you'd really need to manually go through each one to get an ideal solution, or just deal with some weird formatting. You can't get everything from nothing.
Vanguard3000 is offline   Reply With Quote
Old 09-13-2023, 04:22 PM   #19
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,057
Karma: 60358908
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 Elvys View Post
There are more than a thousand formulas. Many look like this:



Too much work to do manually.
It would be faster to enter the size of each one
If the book was done decent, there would be ONE or TWO CSS entries for them all. (mostly single line and stacked)
Inline sizing for every image Note: I would call everyone you showed as a single height style.

If your REGEX fu and CSS fu were above novice level, you might Move the inline styling to the CSS, then merge duplicate styles.

Use Tools: Reports: Image files (on the side bar ) to see the size stats on the images.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show info about the image in popup window of image viewer when reading an ebook codychan Calibre 2 06-04-2021 05:04 PM
Error message: Invalid image: cannot identify image file <_io.BytesIO object at 0x000 bkleine Calibre 0 12-11-2020 04:39 PM
Can I get metadata from cover image? The image is correct but all other data is wrong mydjtl Library Management 1 12-14-2017 05:15 PM
Display of a png image linked to a svg image roger64 Editor 6 03-13-2015 06:21 AM
Image on click change to nex image for Ipad view. vinayaksanga ePub 9 04-29-2013 06:49 AM


All times are GMT -4. The time now is 11:18 PM.


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