|
|
#1 |
|
Member
![]() Posts: 20
Karma: 64
Join Date: Apr 2014
Location: Homer, Illinois, US
Device: Kindle Paperwhite 2
|
[Plugin] sprucer: Semantic (X)HTML Formatter
Hi everyone,
I'm happy to share a new Sigil plugin I've been working on called sprucer. sprucer is a custom plugin designed to rearrange the (X)HTML within an EPUB file so that it is displayed in a way that more accurately depicts its semantic structure, strictly enforcing W3C standards. Key Features:
Installation:
Note: If you are updating from a previous version in the future, you must remove the old plugin via the Manage Plugins menu before adding the new one. Usage: Trigger the plugin via the Plugins > Edit menu, or assign it to a shortcut. A settings window will pop up to grab your preferences (which it remembers for your next session). Click "Run Formatter" to process the files in your open EPUB. The source code, full changelog, and GPLv3 license are available on my GitHub repository here: RelUnrelated/sprucer. I hope you find it useful for cleaning up your EPUB structures. Let me know if you run into any issues or have suggestions for future updates! |
|
|
|
|
|
#2 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,095
Karma: 7640000
Join Date: Nov 2009
Device: many
|
Thank you for your contribution. I will add you to our Sigil Plugin Index.
Just like with our built-in Mend and Prettify, please be aware that css white-space properties can be used and set on any tag so that it must be exempted from whitespace changes just like a pre tag would. Perhaps a warning if that property is used in the css to let users decide how they want to handle that case. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Member
![]() Posts: 20
Karma: 64
Join Date: Apr 2014
Location: Homer, Illinois, US
Device: Kindle Paperwhite 2
|
|
|
|
|
|
|
#4 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,095
Karma: 7640000
Join Date: Nov 2009
Device: many
|
This plugin has now been added to the Sigil Plugin Index.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Semantic markup question! | graycyn | Workshop | 79 | 04-13-2023 05:08 PM |
| Typo in Set Semantic ? | Bertrand | Editor | 1 | 04-06-2016 10:24 AM |
| Understanding html input plugin | nimblebooks | Conversion | 3 | 02-26-2012 01:06 AM |
| Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
| HTML input plugin stripping text within toc tags in child html file | nimblebooks | Conversion | 3 | 02-21-2012 03:24 PM |