Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2016, 11:55 AM   #1
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
[Plugin] AdjustSVG

Hi,

YASP (yet another Sigil Plugin)

When modifying images already wrapped into the SVG element like cropping or resizing you need to change the viewbox attribute values in the svg tag as well as the width and height attribute in the image tag... things a computer can do better.

The plugin will scan all html files and look for an svg element having an image element as child, checking the dimensions and corrects them if they do not match.

It requires sigil >= 0.9.1, Python >= 3.4, PIL and sigil_bs4 library. If you have enabled the internal python interpreter all this is present.

If you are running an external Python interpreter i don't know if this is working due to the required sigil_bs4 lib (Beautifulsoup derivate)

//rubeus

Last edited by rubeus; 03-30-2016 at 04:25 AM.
rubeus is offline   Reply With Quote
Old 01-06-2016, 01:14 PM   #2
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Added to Sigil Plugin Index Sticky Thread
KevinH is online now   Reply With Quote
Advert
Old 01-25-2016, 02:54 PM   #3
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
New version 0.1.1 in #1

- some minor improvements, better testing if its really an svg wrapper
- broken image link will be detected without abend
- workaround for camelcase attribute names in the svg tag
rubeus is offline   Reply With Quote
Old 03-14-2016, 05:17 AM   #4
c4warez
Junior Member
c4warez began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2016
Device: Kindle Paperwhite 3
Very useful plugin... Thanks!


But... Is there a way to make the plugin change ONLY the attribute values inside the svg tag (e.g. don't change the indentation of the rest of the code of the file and the order of the elements and attributes inside the svg tag)?

It's a minor detail that doesn't impact the text itself, but is a little annoying for people like me with a little bit of OCD regarding the way the code looks onscreen.
c4warez is offline   Reply With Quote
Old 03-14-2016, 05:57 AM   #5
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
It changes only the values inside the svg and img element already. Rest is done by beautifulsoup and plugin handler - nothing i can influence.
rubeus is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 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


All times are GMT -4. The time now is 12:18 PM.


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