|
|
#1 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,527
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Request for Enhancement
I have an eBook with some really long filenames. I cannot easily tell this filename on the left is the filename I have in the code view. I'd like to be able to select the image filename and have it select the image in the left.
This is the image name and there are a lot of images with stupid filenames like this. And there are similar stupid filenames with the same image just smaller. The smaller images don't need to exist. But they are also incorrectly in the code. image-119892204_3511918198871636_8155329703591030692_n-sRGB-264-70.jpg <div class="heading-image-size-container"> <img alt="" src="images/llama-sRGB-264-70.jpg"/><img alt="" height="120" src="images/llama-sRGB-120-70.jpg" width="120"/> </div> |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,446
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
so select all the image files and right click and do a bulk rename to nice small names.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 53,837
Karma: 181886195
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
And do the same for the text files. There is no real reason to worry about human readable names but there is no reason to have overly long filenames.
One recent ePub file I edited had the entire title&aubtitle/author name/chapter&number, the ebook ISBN and a date string embedded in every filename (a fan of Amazon's long titles???). I used Sigil's standard rename to rename the chapter files and a regex rename to clean up the image files. The stylesheets were individually renamed. |
|
|
|
|
|
#4 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,527
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#5 |
|
JCL Punch-Card Collector
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 122
Karma: 606562
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
Some publishers are extremely fond of beginning the filename of every file in an epub with the ISBN… and, about half the time, it's not the epub's ISBN, but a paper edition of the book. It's just as annoying as the interminable series of _split000x that results from converting a mobi.
As Kovid says, bulk renaming makes this much easier — and then one can spot the "also by" page in a fifteen-year-old book, and the "here's the first (oops, unedited and unproofread) chapter in the next book in the series," and other ad material, then do with it what is appropriate. Reduces the overall file size and speeds loading on old hardware, too! If you don't like having multiple file extensions for the same kinds of files (for example, both .jpeg and .jpg, or .html and .xhtml), there's also a tool for that in the editor. The bulk-renaming tool leaves the extensions alone. If one has a scheme for standard naming, that makes later creating an omnibus edition (single epub containing several previously-published, related books — a single-volume The Lord of the Rings, for example) a lot easier, and a lot easier to debug when there are any problems, especially with subtly-different stylesheet entries that have the same name. |
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,527
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#7 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 53,837
Karma: 181886195
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Half the complexity in the stylesheets you whinge about is simply trying to have an ebook that will look decent on any ePub, mobi, KF8 and KFX renderer regardless of screen size. For mobi, you also need to use pixels to size images, etc. Hence, the use of two stylesheets, one of which is used for media queries. |
|
|
|
|
|
|
#8 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,527
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
There is no reason why the eBook needs two different size images. There is no reason the filenames need to be stupidly long. There is no reason not to display the cover properly when the cover image is in the internals of the eBook. Another thing is gets wrong is backwards comparability. It's using mega quires for non-Amazon things and not all older software will work with these media queries. You don't do @media not amzn-mobi. You put your non-mobi code in the main CSS and put what you need in @media amzn-mobi. This is all wrong with Vellum. If you are reading the last Vellum eBook I edited as ePub with a Kobo, you will see every chapter header will have two images. One thw wrong sie and they should be centered, but they won't be because of the media-queries. This eBook is available on Overdrive o if you get from from there and do not edit it and do not sync, it will be ePub and will have errors. Vellum needs to understand backwards comparability. Vellum gets that so very wrong for no reason at all. All Vellum has to do is drop non-Mobi media queries and only use media queries for Mobi. Vellum gets too much too wrong. |
|
|
|
|
|
|
#9 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 53,837
Karma: 181886195
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Jon, Jon, Jon...
If Vellum dropped the media queries for KF8/azw3, then how is a mobi renderer supposed to know which one to use? How is a non-mobi renderer know which on to use? Early RMSDK versions happily display both images since it's understanding of media queries was rudimentary. My personal choice would be a regex search that removed the entire <img height=...data-AmznRemoved-M8="true"/> code from any appearances for an ePub conversion. Admittedly, this requires using KindleUnpack not a calibre conversion to preserve most of the original input file and not munge the two Vellum stylesheets into a single stylesheet. Not to mention that KindleUnpack does not split files requiring you to play games with the conversion options to avoid that nasty happening. Oddly enough, I have 4 groups of saved searches just for Vellum generated ePubs after which removing empty divs and spans does a very decent job of cleanup. Code:
<div class="title-page-publisher-logo-size-container">
<a class="link-contains-image" href="http://www.knockon.com"><img src="../images/00003.jpeg" alt="Knock On Publishing" class="title-page-publisher-logo-image" data-AmznRemoved="mobi7"/>
<img height="75" alt="Knock On Publishing" class="title-page-publisher-logo-image1" src="../images/00002.jpeg" width="172" data-AmznRemoved-M8="true"/></a>
</div>
As for your whinging about dual images? As mentioned earlier, one saved search cleans those up very nicely. That is the main reason I have that saved search collection since it automates the cleanup process. Stupid repetitive tasks are begging to have the computer take care of them. Last edited by DNSB; 08-10-2026 at 05:25 PM. Reason: Added comment about dual images. |
|
|
|
|
|
#10 | |
|
JCL Punch-Card Collector
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 122
Karma: 606562
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
|
Quote:
|
|
|
|
|
|
|
#11 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,527
Karma: 153744815
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You only need the media queries for Mobi. I've never seen an ePub that needs media queries for KF8. All the ePub I've converted to KF8 have not had an issue. So if you need so do something specific for Mobi, then you can use specific Mobi media queries.
And as Mobi is now dead at Amazon, there's no need for Vellum to have any media queries. Vellum's media queries are a sloppy mess. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple enhancement request | al1cre | Conversion | 2 | 07-09-2012 05:45 PM |
| Feature / Enhancement Request | _reader | Recipes | 2 | 05-16-2012 10:24 AM |
| Enhancement Request | tacheson | Calibre | 7 | 09-30-2011 12:01 PM |
| Enhancement Request: Catalog | Zebri | Calibre | 2 | 06-18-2010 09:14 AM |
| Enhancement Request? | emellaich | Calibre | 2 | 06-13-2009 12:13 AM |