Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2024, 01:17 PM   #1
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
Thoughts on Potential New Features for Sigil

Hi All,

I am looking for thoughts on new features for future versions of Sigil:

Here is a new feature I have been thinking about ...

Since epubcheck now reports on out of date or incorrect media types, I was thinking of:

A. adding a tool to BookBrowser to change the Media Type for a resource one at a time. Inside Sigil each resource object keeps its own media type internally, and of course there is the OPF manifest which also provides the media type so both have to be updated. Multiple selection in the BookBrowser would be possible.

or

B. adding a new Sigil Tool menu to automatically walk all manifest types updating them when older media types need to be updated to new ones.


The only issue with both option A or B is that of course you can convert a binary media-type to a text media type without losing anything if really needed but not visa-versa. Also what happens when the new media-type input from the user is actually has a different file format that what was provided in the OPF when first launched. That should not happen often but it could.


So I would love to hear from you to understand if either option A or B would be useful enough to add to Sigil itself instead or if you feel these things would be better as a plugin, or not useful at all.

Please use this thread to make other feature suggestions that might prove useful to the main body of Sigil users. Please try not to suggest things that have already been ruled out in earlier feature threads or that already exist in the form of a plugin.

Be sure to explain why you think your feature would benefit the majority of the users of Sigil.

Thanks.

Last edited by KevinH; 08-23-2024 at 01:21 PM.
KevinH is offline   Reply With Quote
Old 08-23-2024, 04:09 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
How about a "Fix outdated/wrong media types" right-click Book Browser menu option that is only shown for .opf files?
Doitsu is offline   Reply With Quote
Advert
Old 08-23-2024, 08:53 PM   #3
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Doitsu View Post
How about a "Fix outdated/wrong media types" right-click Book Browser menu option that is only shown for .opf files?
Yes that should be doable and better than yet another menu item under Sigil Tools.
KevinH is offline   Reply With Quote
Old 08-24-2024, 09:30 AM   #4
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 420
Karma: 145424
Join Date: Dec 2017
Device: Kobo
I would have liked a dedicated tool, which would offer many options, but a such use case would be absolutely rare. Apart from correcting wrong media types, altering the media type by anything other than that on of the file makes almost no sense and is of no use. And if you really wanted to do it, then you knew exactly what you were doing and didn't need such a tool.

So @Doitsu's proposal is really perfect. Simple, small and effective.
However, I recommend making this action accessible into the Automation tool.
un_pogaz is offline   Reply With Quote
Old 08-24-2024, 09:36 AM   #5
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
The only hard case is pure xml files with the generic .xml file extension but no way to easily detect what type of xml is in the file. I could always leave them alone and not update those.
KevinH is offline   Reply With Quote
Advert
Old 08-24-2024, 10:01 AM   #6
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: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
Or perhaps in the case of questionable .xml files, the choice of whether to treat them as pure xml or as “application/xhtml+xml”.
BeckyEbook is offline   Reply With Quote
Old 08-24-2024, 10:10 AM   #7
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
Detecting html and doctype tags in a generic xml file should be quite easy to do. Those we can handle.
KevinH is offline   Reply With Quote
Old 08-24-2024, 10:46 AM   #8
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
The other interesting case would be how to deal with media-types where they allow multiple media types for the same resource. Seems like Fonts and Javascripts are big with multiple names

Code:
Images
--------
image/gif  - GIF Images
image/jpeg - JPEG Images
image/png  - PNG Images
image/svg+xml - SVG documents
image/webp - WebP Images

Audio
-------
audio/mpeg - MP3 audio
audio/mp4 - AAC LC audio using MP4 container
audio/ogg - OPUS audio using OGG container

Style
------
text/css - CSS Style Sheets.

Fonts
------
font/ttf 
application/font-sfnt - TrueType fonts

font/otf
application/font-sfnt
application/vnd.ms-opentype - OpenType fonts

font/woff 
application/font-woff - WOFF fonts
font/woff2 - WOFF2 fonts

Other
------
application/xhtml+xml - XHTML content documents


application/javascript
application/ecmascript
text/javascript  - JavaScripts

application/x-dtbncx+xml - The legacy NCX.

application/smil+xml	- EPUB media overlay documents

Last edited by KevinH; 08-24-2024 at 12:03 PM.
KevinH is offline   Reply With Quote
Old 08-29-2024, 02:56 PM   #9
nabsltd
Evangelist
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 458
Karma: 7897546
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
I'd like the CSS mend/pretty to have an option to convert all measures that are effectively zero to 0;

In other words:
Code:
.someclass {
  margin-left: 0em;
  margin-right: 0px;
  margin-top: 0.0em;
  margin-bottom: 0;
}
would become:
Code:
.someclass {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
}
This way, I can search and replace more easily. There's no good regex that covers all the ways to declare a measurement in CSS.
nabsltd is offline   Reply With Quote
Old 08-29-2024, 03:16 PM   #10
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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
I think a regex could do that quite easily. You do know that regex will allow the equivalent of an "or" right (em|px|…). And using the regex function replacement plugin could easily numerically evaluate any set of digits with decimal points to compare it to 0.
KevinH is offline   Reply With Quote
Old 08-29-2024, 07:35 PM   #11
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: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
In Sigil, something like this works:

Find:
Code:
:(\s*)0(?:\.0+)?(?:em|px|rem|%|vh|vw|vmin|vmax|cm|mm|in|pt|pc)?(?=;|\s|$)
Replace:
Code:
: 0
I can't do any better, maybe I'm tired of the heat.
BeckyEbook is offline   Reply With Quote
Old 08-29-2024, 07:44 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,219
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by BeckyEbook View Post
In Sigil, something like this works:

Find:
Code:
:(\s*)0(?:\.0+)?(?:em|px|rem|%|vh|vw|vmin|vmax|cm|mm|in|pt|pc)?(?=;|\s|$)
Replace:
Code:
: 0
I can't do any better, maybe I'm tired of the heat.
....although I would probably get rid of the : at the beginning in case there are any shorthand...eg margin: 0px 0em 0vw 0.0rem;

I obviously haven't tested this... (I'm taking a 'coke' break at work ) maybe it already does shorthand???

Last edited by Turtle91; 08-29-2024 at 07:48 PM.
Turtle91 is offline   Reply With Quote
Old 08-29-2024, 08:02 PM   #13
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: 781
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
You are right! A quick test worked, but I still need to test it on larger samples.
Removing the colon simplifies things, although I started with it and stayed that way until the end.
BeckyEbook is offline   Reply With Quote
Old 08-30-2024, 05:02 AM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,326
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
With that CSS,
Code:
margin: 0px 0em 0 0%;
becomes
Code:
margin: 0 0em 0 0%;

Last edited by JSWolf; 08-30-2024 at 05:14 AM.
JSWolf is offline   Reply With Quote
Old 08-30-2024, 05:50 AM   #15
repilo
Connoisseur
repilo began at the beginning.
 
Posts: 68
Karma: 10
Join Date: Apr 2021
Location: Spain
Device: Kobo Libra 2
It would be great if it were possible to select text with the mouse in other places (Wikipedia, newspapers), copy it and paste it into Sigil while retaining italics and bold.
repilo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ALERT: Potential Issues with Sigil 2.2.X and rtl languages and Normalization Forms KevinH Sigil 41 07-01-2024 09:09 AM
Features that i miss in Sigil abraum Sigil 24 07-21-2021 10:52 AM
What Features or Tools does Sigil Still Need Yet? KevinH Sigil 175 03-06-2021 09:11 PM
New Plugin Features in the upcoming Sigil 0.8.900 KevinH Plugins 6 09-14-2015 02:48 PM
Writer2ePub, Sigil, and mjBookMaker Features Ransom Writer2ePub 1 09-21-2011 09:20 AM


All times are GMT -4. The time now is 01:36 AM.


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