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 03-04-2022, 05:07 AM   #16
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Plugin Update(v0.1.6):

1. This plugin can now process and convert pixels to em values in the css. My thanks to gregorio and Doitsu for the suggestion.

2. The plugin will not convert px to em values if the pixel values are being used within the following class properties: width, height, max-width, max-height and border.


Last edited by slowsmile; 03-09-2022 at 11:48 PM.
slowsmile is offline   Reply With Quote
Old 03-06-2022, 10:23 PM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,578
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I rain into one oddment. The epub I was editing had the following in the CSS:
Code:
img.full {
  display: block;
  width: 100%;
  object-fit: contain;
  height: 100vh;
  margin-left: auto;
  margin-right: auto;
}
which triggered:
Code:
ValueError: could not convert string to float: ' conta'
Error: could not convert string to float: ' conta'
Since the object-fit line was the only one in the CSS stylesheets that contained the string "conta", I removed it and and the error disappeared
DNSB is online now   Reply With Quote
Old 03-07-2022, 12:11 AM   #18
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@DNSB . . . Thanks for reporting that problem. I've already had a look at the problem and I've put in a fix. I'm testing the fix now. New plugin release soon.

Last edited by slowsmile; 03-07-2022 at 12:16 AM.
slowsmile is offline   Reply With Quote
Old 03-07-2022, 12:55 AM   #19
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@DNSB. . . Regarding your test epub problem -- if I ran my plugin on your test file, it would always fail. But if I first run the cssRemoveUnusedSelectors plugin and then run my plugin on your test file afterwards then it always converts pixels to ems without any problems and with no errors. So the problem with your test epub css seems to be something structural that is not related to my plugin. And if you run the cssRemoveUnusedSelectors plugin prior to running my plugin it always seems to completely remove that problem.

Last edited by slowsmile; 03-07-2022 at 01:08 AM.
slowsmile is offline   Reply With Quote
Old 03-07-2022, 02:36 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,578
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I went back to the epub I was editing when I noticed the problem. Ran CSSRemoveUnusedSelectors and the error was still present:

Spoiler:
Code:
Status: failed

Python version:  3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] 

Running ConvertAbs2RelCSSValues...Please wait

 -- Write to work dir...C:\Users\David\AppData\Local\Temp\tmp4jdqw_ez\SBsignup.css
 -- Write to work dir...C:\Users\David\AppData\Local\Temp\tmp4jdqw_ez\idGeneratedStyles.css

 >>> ask yesno - convert to long form...False

 -- Processing automatic tasks...
 -- Convert absolute values to relative em values in the CSS
In convertAbs2RelCSSValues()...
 -- Convert absolute to relative values in the CSS
In convertAbs2RelCSSValues()...
 -- Convert absolute to relative values in the CSS
>>>IN INCHES TO EM CALCULATION....
Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\ConvertAbs2RelCSSValues\plugin.py", line 102, in run
    processAllTasks(bk, WDIR, s_ids, s_fnames)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\ConvertAbs2RelCSSValues\cutils.py", line 29, in processAllTasks
    convertAbs2RelCSSValues(wdir, file)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\ConvertAbs2RelCSSValues\cutils.py", line 182, in convertAbs2RelCSSValues
    points = float(point)
ValueError: could not convert string to float: ' conta'
Error: could not convert string to float: ' conta'


I've attached a scrambled and simplified copy of the epub where I ran into this issue.
Attached Files
File Type: epub scrambled.epub (169.9 KB, 260 views)
DNSB is online now   Reply With Quote
Old 03-07-2022, 07:37 PM   #21
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@DNSB...I can confirm the problem that you reported above although I'm not sure why the plugin didn't do its job -- especially since the original plugin had the correct update version on it. Anyway, your problem or mix-up was probably my error, so my humble apologies for that. I've already fixed that problem so I'll put out another version of this plugin(as v0.1.7) sometime today.

Last edited by slowsmile; 03-08-2022 at 06:21 AM.
slowsmile is offline   Reply With Quote
Old 03-07-2022, 08:29 PM   #22
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Plugin Update(v0.1.7):

Fixed a problem with inches conversion that DNSB reported.

Last edited by slowsmile; 03-07-2022 at 10:17 PM.
slowsmile is offline   Reply With Quote
Old 12-11-2023, 01:00 PM   #23
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
To protect your intellectual property from being stolen or copied by any external website.

These are python plugins for Sigil. There are lots of them that perform useful functions.

Quote:
Originally Posted by Paul Collins View Post
Why would I install additional soft if I can convert it online on sites like https://oneconvert.com/?
KevinH is offline   Reply With Quote
Old 12-11-2023, 01:40 PM   #24
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's a spammer, Kevin. I'm going to get rid of him/it.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 02:25 AM
Problem with my ScrambleEbook plugin and the Plugin Updater tool jackie_w Development 14 01-19-2017 11:49 PM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 03:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 01:11 PM


All times are GMT -4. The time now is 02:05 AM.


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