![]() |
[Plugin] StylePropertiesCleanup
3 Attachment(s)
Globally removes user selected style properties from the CSS or html files. Requirements Plugin Type: Edit MIT Licence(OSI) Minimum Sigil requirement: v0.9.3 or higher Python Requirements: Python 3.4+ (Bundled or External) OS Requirements: Windows, OSX or Linux *** Tested on Windows 10, OSX and Linux *** Current Version: "0.1.6" Installation * Select Manage Plugins from the Plugins menu. In the dialog box, select either the Bundled Python or the External Python(Python 3.4+ should be installed on your computer to run this plugin externally). * Click Add Plugin and select StylePropertiesCleanup_vXXX.zip. This will load and install the plugin into Sigil, which you can then select and run using Plugins > Edit > StylePropertiesCleanup. Description This simple plugin allows the user to globally remove any style property from the epub CSS or html. It gives the plugin user a safe and simpler alternative for removing unwanted style properties rather than using Sigil's Search and Replace with regex. This plugin should work for imported html(added in v0.1.5) and epubs, including epub 3. Usage and Features In the input dialog textbox just type in any single style property or you can type in a space delimited or comma delimited list of style properties to be removed globally in a single batch run. This plugin should help to make it easier to clean up stylesheets and clean up html inline styling. You can use any style property you like such as font-size, font-family, page-break-before, letter-spacing, widows, orphans, -webkit-hyphens etc and then just select your options below: 1. Remove selected style properties from epub CSS only. 2. Remove selected style properties from epub html only. 3. Remove selected style properties from imported html only.(added in v0.1.5) For imported html files only, it's also advisable to run Tools > Reformat HTML > Mend and Prettify All HTML Files in Sigil before you run this plugin to avoid any text wrapping issues. And at the end of the plugin run another dialog will report the total number of style properties removed. Note: Be aware that option 3 will only remove style properties from the imported HTML body section -- but it will not remove any style properties from the HTML <style> section. Changes: Spoiler:
|
Update(v0.1.1)_:
|
Update(v0.1.5):
|
It's crunching and removing the leading spaces in the css files as well as the xhtml files, even if you only check 1 of the boxes. Unfortunately sigil doesn't have a prettify for the css files like it does for the xhtml files.
|
Quote:
|
Quote:
Thank you! I wish I'd known about that earlier; I've had some books that had funky css formatting where I used calibre's editor since its prettify does both html and css. |
Can someone add this plugin to the Sigil Plugin Index?
|
Added now.
Quote:
|
Thanks.
|
| All times are GMT -4. The time now is 08:45 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.