Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-20-2019, 08:39 PM   #61
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: 493
Karma: 787388
Join Date: May 2013
Location: Philippines
Device: Android S5
@Kiruhdu...The body tag with 3% margins was put in for better readability in Book View in Sigil. But if you want to change the margin settings then the only way you can do that is in the html in the following way:

After running the plugin:

* Go to the Book Browser and click on an *.xhtml file.
* Switch to HTML View
* Find the body {} tag and remove or change just the margin values for "style="margin: 3% 3% 3% 3%;" to your own preference.
* Do this for all files in the Book Browser.

....Or you can just use Sigil's Search and Replace. Search all the xhtml files for "style="margin: 3% 3% 3% 3%;" and replace it with whatever margin values you prefer e.g. "style="margin: 5% 5% 5% 5%;". You can also just remove this body styling completely using Search and Replace if you wish. You'll only need to do this once.

Last edited by slowsmile; 02-20-2019 at 09:14 PM.
slowsmile is offline   Reply With Quote
Old 04-20-2019, 06:38 AM   #62
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: 493
Karma: 787388
Join Date: May 2013
Location: Philippines
Device: Android S5
Update v0.4.1: Fixed bug in removeUnusedBookmarks()
slowsmile is offline   Reply With Quote
Old 08-18-2019, 12:20 AM   #63
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: 493
Karma: 787388
Join Date: May 2013
Location: Philippines
Device: Android S5
Update(v0.4.2)
-- Fixed a bug whereby the plugin would crash if the input epub had a stylesheet named "styles.css".
slowsmile is offline   Reply With Quote
Old 11-22-2019, 07:07 AM   #64
beiti
Junior Member
beiti is on a distinguished road
 
Posts: 4
Karma: 50
Join Date: Oct 2015
Device: several
I just tried to use CustomCleanerPlus for the first time.
I checked the option "Reformat smaller ebook images [...]" to get rid of the pixel values in IMG tags.

Unfortunately CustomCleaner seems to bring every picture to 100% screen size - even pictures that were really tiny in my original document. What is the "base pixel size" that CustomCleaner defines as 100%?

Here is an example. Before running CustomCleaner the IMG tag looked like this:
<img src="../Images/img00002.JPG" width="143" height="192" alt=""/>

And that is what CustomCleaner made out of it:
<img alt="" src="../Images/img00002.JPG" style="width: 100%;height: auto;"/>
beiti is offline   Reply With Quote
Old 11-22-2019, 07:29 AM   #65
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: 493
Karma: 787388
Join Date: May 2013
Location: Philippines
Device: Android S5
@beiti...I've just downloaded the current CustomCleanerPlus plugin and set the "Reformat smaller images option..." and tested it in Sigil on several test epubs that contain smaller images and it worked OK.

The base width is set to 650 px but I don't think that really has anything to do with your problem.

And just because your epub image dimensions were set as <img src="../Images/img00002.JPG" width="143" height="192" alt=""/> in your xhtml file does not necessarily mean that img0002.jpg was stored in the epubs Images directory with those same height and width dimensions.

So, before you run the plugin, I would check that all your smaller images in the epub xhtml files have the same h/w pixel values as the same images stored in the Images directory in your epub because the plugin always uses image pixel dimensions that are stored in the epub's Images directory -- it does not use the image pixel values that are used within the image tags in the xhtml files.

Last edited by slowsmile; 11-22-2019 at 11:37 AM.
slowsmile is offline   Reply With Quote
Old 11-22-2019, 06:02 PM   #66
beiti
Junior Member
beiti is on a distinguished road
 
Posts: 4
Karma: 50
Join Date: Oct 2015
Device: several
Quote:
Originally Posted by slowsmile View Post
The base width is set to 650 px [...]
the plugin always uses image pixel dimensions that are stored in the epub's Images directory -- it does not use the image pixel values that are used within the image tags in the xhtml files.
Thanks a lot for this reply! That made things much clearer for me.
Quote:
Originally Posted by slowsmile View Post
just because your epub image dimensions were set as <img src="../Images/img00002.JPG" width="143" height="192" alt=""/> in your xhtml file does not necessarily mean that img0002.jpg was stored in the epubs Images directory with those same height and width dimensions.
No, they are not. They are all 1200px on the longer side. It's the concept of high resolution images.

I'm still trying to find a proper workflow for a ebook project with about 200 images. I use TextMaker as word processor, but the epub files out of TextMaker always need some fine tuning in Sigil - and your PlugIn comes in handy, also for setting image sizes.
One of my problems is managing the various picture sizes; some pictures need to be full width, others can be shown much smaller in the epub layout. My original idea was to export all of them using the same pixel width or hight and then regulate the actual "print" size by making them bigger or smaller in TextMaker (which translates to pixel values in the exported html file - TextMaker doesn't change the image files itself and just copies them to the epub folder).
Now that I know your plugin uses the actual pixel dimensions of the image files, I will change my strategy. I will go back to my photo editor and export the images in different pixel sizes, dependig on the size/width I want them to appear in the ebook. After TextMaker has written the raw epub file, I will use Sigil and CustomCleaner to get percentage values instead of pixel values in the html part.

The only thing that bothers me is that I'm not happy with the 640 px base width. I'm still not sure how big my pictures should be at full with, but certainly more than 640 px.
I spent some time now analysing the insides of the CustomCleaner zip file and I think I know how to adapt it to my needs. To be honest, I don't know anything about Python programming, but I found some lines in the cutils.py file were the values seem to be defined (perc_width = round(width/640 * 100) and the same for a hight maximum). So I tried to chance them, and after a short test it seems to work fine.

Thanks again for your quick help!
beiti is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 25 10-13-2019 12:32 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 09:28 PM.


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