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, 07: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: 553
Karma: 788808
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 08:14 PM.
slowsmile is offline   Reply With Quote
Old 04-20-2019, 05: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: 553
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update v0.4.1: Fixed bug in removeUnusedBookmarks()
slowsmile is offline   Reply With Quote
Advert
Old 08-17-2019, 11:20 PM   #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: 553
Karma: 788808
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, 06:07 AM   #64
beiti
Member
beiti is on a distinguished road
 
Posts: 18
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, 06: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: 553
Karma: 788808
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 10:37 AM.
slowsmile is offline   Reply With Quote
Advert
Old 11-22-2019, 05:02 PM   #66
beiti
Member
beiti is on a distinguished road
 
Posts: 18
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
Old 05-11-2020, 05:50 AM   #67
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
Failed on Sigil 1.2 Win10 64bit book from gutenberg

https://pastebin.com/F2MUebCY
najgori is offline   Reply With Quote
Old 05-11-2020, 08:37 AM   #68
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: 553
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@najgori...The problem you're having is that the "tidy.dll" library could not be loaded when you ran the CustomCleanerPlus plugin on your system. This library file is located on your system at:

C:\Users\Lapis\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\win6 4\tidy.dll

I've also just downloaded and run the CustomCleanerPlus plugin from MR and I ran it (using Bundled Python) without any problems on a test epub using Sigil(v1.2) on my own Windows 10 system.

The only thing I can suggest for now is that your "tidy.dll" library file might have been corrupted on initial plugin download. Perhaps best if you remove the original CustomCleanerPlus plugin from Sigil and then try downloading and installing the plugin from MR again and retry.

Last edited by slowsmile; 05-11-2020 at 09:18 AM.
slowsmile is offline   Reply With Quote
Old 05-11-2020, 10:31 AM   #69
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
Sorry. It's my laptop showing years. Works fine on my desktop.
najgori is offline   Reply With Quote
Old 05-13-2020, 10:07 AM   #70
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
Laptop is fine. Problem is with libraries or something IDK.
To reproduce "bug" you need to install latest Sigil on new Windows 10 system.
Problem disappeared after installing oldest supported Sigil - 9.3. and then the latest.

"and it's a story that might bore you but you don't have to listen" B.E.E. The Rules of Attraction
najgori is offline   Reply With Quote
Old 07-02-2020, 11:20 PM   #71
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: 553
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Plugin Update(v0.4.7):
  • New functionality. Added a new option to allow the user to automatically move the html CSS to a new stylesheet (for imported html only).
  • Fixed a problem with removing unused bookmarks in the plugin. The plugin now automatically removes unused bookmarks from both imported html and epubs.

Last edited by slowsmile; 07-03-2020 at 07:42 PM.
slowsmile is offline   Reply With Quote
Old 05-09-2021, 07:30 AM   #72
Leonatus
Guru
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 879
Karma: 9347255
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Touch
Win10, 32 bit, Sigil v. 1.5.1, Plugin v. 0.4.9.
At running (selected: all) , I receive this message:
Code:
Status: failed

Python version:  3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] 

Running CustomCleanerPlus...

 -- Copy to work dir...Léon de Tinseau, L'attelage de la Marquise.html
 

 -- Processing automatic tasks...
 -- Clean and reformat the html

>>> In remove bookmarks...

 >>> File type is: HTML
 >>> Doctype is: LibreOffice

 -- Processing file...Léon de Tinseau, L'attelage de la Marquise.html
 -- Remove blank lines
 -- Remove empty tags
 -- Remove tabs and spaces
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\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\plugin.py", line 138, in run
    css_fnames = processAllTasks(bk, WDIR, t_fnames, s_fnames, s_ids)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\cutils2.py", line 52, in processAllTasks
    docTidyNoWrap(wdir, file)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\doc_tidy.py", line 129, in docTidyNoWrap
    html, errors = tidy_document(xhtml, options=base_options)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\tidy.py", line 292, in tidy_document
    return get_module_tidy().tidy_document(text, options)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\tidy.py", line 304, in get_module_tidy
    _tidy = Tidy()
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\tidy.py", line 158, in __init__
    raise OSError(
OSError: 
Could not load library: C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\win32\tidy.dll
Error: 
Could not load library: C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\win32\tidy.dll
Could soemone help, please?
Edit: Error message appears also after removing addin and downloading/installing again.

Last edited by Leonatus; 05-09-2021 at 07:35 AM.
Leonatus is offline   Reply With Quote
Old 05-09-2021, 09:23 AM   #73
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,259
Karma: 19618507
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Leonatus View Post
Could someone help, please?
Most likely the plugin doesn't detect that you're using a 32bit operating system. Locate the following code block in "sigil-ebook\sigil\plugins\CustomCleanerPlus\tidylib\tidy.py"

Code:
if sys.platform.startswith('win'):  # for Windows 7, 8 & 10 only
    lib_path = win32_lib          
    if is_64bit:
        lib_path = win64_lib      
and delete the two red lines.

FYI: The plugin apparently uses HTML Tidy, which has been removed from older Sigil versions because it can cause major data loss. You definitely should make a backup copy of your e-book before running the plugin.

Last edited by Doitsu; 05-09-2021 at 09:28 AM.
Doitsu is offline   Reply With Quote
Old 05-09-2021, 09:38 AM   #74
Leonatus
Guru
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 879
Karma: 9347255
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Touch
Quote:
Originally Posted by Doitsu View Post
You definitely should make a backup copy of your e-book before running the plugin.
I made several ones.

But, after all, it's the same error message.

Edit: Just for testing purposes, I downloaded the "HTML2Epub"-Plugin, and the error message is quite the same:
Code:
Status: failed

Python version:  3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] 

Running HTML2Epub...Please wait...this might take several minutes.

 -- Input file encoding is: CP1252
 -- Convert input file to utf-8 if required


 -- Processing automatic tasks...
 -- Clean and reformat the html
 -- Input file encoding is: UTF-8
 -- Convert input file to utf-8 if required

 >>> Doctype is: LibreOffice

 -- In cleanHTML processing file...C:\Users\Juerg\AppData\Local\Temp\tmpt0fla1av\Léon de Tinseau, L'attelage de la Marquise.html
 -- Remove blank lines
 -- Remove empty tags
 -- Remove tabs and spaces
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\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\plugin.py", line 143, in run
    cleanHTML(WDIR, os.path.join(WDIR, html_file))
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\cleaner.py", line 43, in cleanHTML
    docTidyNoWrap(wdir, file)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\doc_tidy.py", line 129, in docTidyNoWrap
    html, errors = tidy_document(xhtml, options=base_options)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\tidylib\tidy.py", line 292, in tidy_document
    return get_module_tidy().tidy_document(text, options)
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\tidylib\tidy.py", line 304, in get_module_tidy
    _tidy = Tidy()
  File "C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\tidylib\tidy.py", line 158, in __init__
    raise OSError(
OSError: 
Could not load library: C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\tidylib\win32\tidy.dll
Error: 
Could not load library: C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\HTML2Epub\tidylib\win32\tidy.dll

Last edited by Leonatus; 05-09-2021 at 09:55 AM.
Leonatus is offline   Reply With Quote
Old 05-09-2021, 10:31 AM   #75
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,259
Karma: 19618507
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Leonatus View Post
But, after all, it's the same error message.
In that case, the plugin developer will need to update the code.
Doitsu 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-12-2019 11:32 PM
Problem with my ScrambleEbook plugin and the Plugin Updater tool jackie_w Development 14 01-19-2017 10:49 PM
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 06:09 PM.


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