Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-06-2024, 01:05 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I've not tested it, but I also think that you wouldn't be able to properly add any existing image files named like that to Sigil on any platform--including Linux. Sigil wouldn't know how to manifest it properly. I'm guessing it would end up manifested as text/plain and show up in Misc rather than Images.

You'd have to rename *.jpg files to your *.09_jpg preference only after they've been successfully added and manifested as image/jpeg in the opf.
DiapDealer is offline   Reply With Quote
Old 10-06-2024, 04:48 PM   #17
KarlG
Connoisseur
KarlG began at the beginning.
 
Posts: 62
Karma: 10
Join Date: Mar 2024
Device: none
Quote:
Originally Posted by DiapDealer View Post
I've not tested it, but I also think that you wouldn't be able to properly add any existing image files named like that to Sigil on any platform--including Linux. Sigil wouldn't know how to manifest it properly. I'm guessing it would end up manifested as text/plain and show up in Misc rather than Images.

You'd have to rename *.jpg files to your *.09_jpg preference only after they've been successfully added and manifested as image/jpeg in the opf.
I didn't actually add the files, I wanted to rename them temporarily because some of the filenames had 2 full-stops '.' in them and I was having trouble just replacing the first one, so I changed the second '.' to _ and that was when I noticed the issue.

I liked your suggestion earlier about using a slightly different regex though, so I'll use that for the future.
KarlG is offline   Reply With Quote
Old 10-06-2024, 07:41 PM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I figured they were probably part of an existing epub. I was just pointing out that when adding external files to a Sigil epub, the file extension is the only (I think) thing that tells Sigil what the media type should be in the manifest.
DiapDealer is offline   Reply With Quote
Old 10-07-2024, 01:20 AM   #19
KarlG
Connoisseur
KarlG began at the beginning.
 
Posts: 62
Karma: 10
Join Date: Mar 2024
Device: none
Yes sure. Sometimes I'm spoiled as a linux user
KarlG is offline   Reply With Quote
Old 10-07-2024, 03:12 AM   #20
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,158
Karma: 5450818
Join Date: Nov 2009
Device: many
Linux can and does support file extensions. The only way extensions can really be dropped is to use a program internally to check the initial bytes for some "magic" byte patterns but this is generally not portable. Hiding file extensions is a good way to be tricked into running something you should not. Combining file extensions that match with "magic byte sequences" is the best for portability and security.
KevinH is offline   Reply With Quote
Old 10-07-2024, 07:05 AM   #21
KarlG
Connoisseur
KarlG began at the beginning.
 
Posts: 62
Karma: 10
Join Date: Mar 2024
Device: none
Quote:
Originally Posted by KevinH View Post
Linux can and does support file extensions. The only way extensions can really be dropped is to use a program internally to check the initial bytes for some "magic" byte patterns but this is generally not portable. Hiding file extensions is a good way to be tricked into running something you should not. Combining file extensions that match with "magic byte sequences" is the best for portability and security.
Indeed.
KarlG is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pdf regex question - regex that wraps to a new line flyash Conversion 1 09-05-2021 10:00 AM
Class Rename Issue Paulie_D Editor 2 03-29-2021 01:09 PM
Predefined regex for Regex-function sherman Editor 3 01-19-2020 06:32 AM
regex - issue with spaces? cybmole Editor 43 12-31-2013 01:49 PM
regex Issue when Importing river Calibre 3 06-16-2009 12:03 PM


All times are GMT -4. The time now is 03:15 AM.


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