03-20-2021, 06:11 PM | #46 |
Moderately Puzzled
Posts: 1
Karma: 10
Join Date: Mar 2021
Device: MARVIN on iOS
|
CSS Preprocessor Support / plugin
It would be handy to be able to write, for example, SASS (scss) stylesheets, and have Sigil update the .scss to .css.
But any reasonably powerful CSS-extension language (Sass, Less, Stylus) would work. Came to this forum to see if someone had already created such a beast, or, worst case, estimate the effort required to do it myself. And since you're asking what I'd like to see ... well, I'd love to see one! Cheers, OT |
03-20-2021, 08:23 PM | #47 |
Sigil Developer
Posts: 8,110
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Are there open source (GPL/MIT/BSD) projects that can take CSS extension languages and generate standard css? If so, this would certainly be something for a plugin. I have never used any of these, so links to appropriate github projects in python3, C, or C++ that does this might help.
|
Advert | |
|
01-09-2023, 11:14 PM | #48 |
Connoisseur
Posts: 92
Karma: 50000
Join Date: Oct 2009
Device: none
|
Replace title value with h1 value
It would be nice to have a plugin that searches the value of the first h1 element in html file and puts it in the title element of the same html file. I'm using InDesign to create ebooks and the title element is just something generic. I checked available Sigil plugins but nothing I found seemed to do this.
|
01-09-2023, 11:54 PM | #49 |
A Hairy Wizard
Posts: 3,211
Karma: 19000001
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
|
find replace would do it.
Code:
find: <title>.*?</title>(.*?)<h1>(.*?)</h1> replace: <title>/2</title>/1<h1>/2</h1> Although, I wouldn't worry about doing this for each html file. Most readers/apps don't really care about that, if at all. So I put the title of the book at the top of the page, not the title of the chapters. I actually replace the entire header portion with a simplified version to clean up a lot of the fluff people put in the header: Code:
find: .*?</head> replace: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title of the Book</title> <link href="../Styles/styles.css" type="text/css" rel="stylesheet"/> </head> Last edited by Turtle91; 01-10-2023 at 12:01 AM. |
01-10-2023, 05:31 AM | #50 | |
Guru
Posts: 771
Karma: 2297170
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
|
|
Advert | |
|
02-15-2023, 09:59 PM | #51 | |
Connoisseur
Posts: 92
Karma: 50000
Join Date: Oct 2009
Device: none
|
Quote:
I'm creating accessible ebooks and I need to have descriptive title for each xhtml file as explained in Daisy's instructions. Having a name of the book in each title element isn't adequate. |
|
02-16-2023, 08:57 AM | #52 |
Sigil Developer
Posts: 8,110
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Shameless plug ... if you are interested in creating more accessible epub3, you might want to checkout my Access-Aide plugin which will properly fill in missing titles, allow img alt attributes to be easily updates, add aria roles based on existing epub:type attributes, and etc.
|
02-27-2023, 01:56 AM | #53 | |
Connoisseur
Posts: 92
Karma: 50000
Join Date: Oct 2009
Device: none
|
Quote:
|
|
02-27-2023, 02:37 AM | #54 |
Sigil Developer
Posts: 8,110
Karma: 5450184
Join Date: Nov 2009
Device: many
|
I never use InDesign as it just makes extra work for me.
Note: You can easily use Sigil's Find and Replace All capability to empty all title tags at the same time n one go *before* running the plugin. Last edited by KevinH; 02-27-2023 at 04:27 AM. |
02-27-2023, 06:08 AM | #55 | |
Resident Curmudgeon
Posts: 76,044
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
That's how the title is supposed to be used. It's not supposed to be used to put in things like Chapter 1. |
|
02-27-2023, 10:18 AM | #56 |
A Hairy Wizard
Posts: 3,211
Karma: 19000001
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
|
Welllllll, actually….
There is no requirement for anything to be in the title tags…. Just that you have a title tag. Originally html documents were not designed to be zipped up and put in a book… When multi-tabbed browsers were introduced they would use the contents of the title tag in the tab, but otherwise most readers/devices/apps completely ignore the contents of the title tag. There is nothing wrong with putting chapter names in there, it’s just largely irrelevant. |
02-27-2023, 10:39 AM | #57 |
Sigil Developer
Posts: 8,110
Karma: 5450184
Join Date: Nov 2009
Device: many
|
For accessible epub reasons, they require that the title tag be filled and that they should be relevant to that html file (for screen readers and things).
|
02-27-2023, 11:04 AM | #58 |
A Hairy Wizard
Posts: 3,211
Karma: 19000001
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
|
Valid point!
I was only thinking about ePub standard, not accessibility standard. Thanks! |
02-27-2023, 07:44 PM | #59 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Chang...Another shameless plug. I also have two plugins that automatically add the section or chapter title to the <title></title> tags. These plugins are GenerteHeaders and CustomCleanerPlus. Both these plugins automatically set the title name to the current chapter or section heading name.
|
12-25-2023, 05:26 AM | #60 |
Member
Posts: 12
Karma: 10
Join Date: Dec 2020
Device: Android
|
Is there a plugin that can save the search & replace as favourite? This make repeating search & replace much easier.
Is is difficult to just depend on the droplist history. I have to create a txt file to save a long list of normal & regex for what i need to search and replace, then copy paste to Sigil, select either regex or normal, select either this page or whole html.... which is very troublesome. I need to do this for every book i download. Everytime i download a book i will be like oh gosh i need to repeat the same thing all over again... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 494 | 05-18-2024 02:34 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |