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-28-2018, 03:23 PM   #16
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
Quote:
Originally Posted by roger64 View Post
I found that some books use a double chapter title, I mean two successive h1 (which I don't like but I can't help). This is translated by two <h1> tags with a pagebreak between (which is a normal "clean" behaviour). It's not that easy to batch glue them together. Any advice?
Maybe you can use RegEx replacements to do that, all at once...
It depends on how it's the xhtml code, and how you like to change it.

Quote:
Originally Posted by roger64 View Post
Edit: after further testing, this is to confirm that the major question is that LO converts this amazingly precise file to odt in a somewhat shaky way. And this part (html>odt) is 100% out of control of the plugin...
You've said it all.


Regards.
PeTrDu is offline   Reply With Quote
Advert
Old 03-02-2018, 08:21 AM   #17
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
HTMLgen v0.0.8

Here's a small update for HTMLgen.

Changes in v0.0.8:
  • Added translations: French (thanks to Arios), Polish (thanks to bravosx), and Catalan.
  • Fixed bug: In some cases, font files weren't properly linked, I hope it's OK now.
  • Fixed bug: Wrong time calculation, my bad!
  • Compatibility issue: headers like <h1 /> will be changed to <h1></h1> to prevent problems with some webbrowsers.
  • Added <hr/> separator between text files.

Regards
PeTrDu is offline   Reply With Quote
Old 03-02-2018, 01:38 PM   #18
BeckyEbook
Connoisseur
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 86
Karma: 387086
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Icon proposition.
Attached Images
 
BeckyEbook is offline   Reply With Quote
Old 03-09-2018, 12:03 PM   #19
Auramazda
Member
Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.
 
Posts: 15
Karma: 1422
Join Date: Mar 2016
Device: none
I sent in PM the italian translation
Auramazda is offline   Reply With Quote
Old 03-10-2018, 09:03 AM   #20
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
Smile

Quote:
Originally Posted by BeckyEbook View Post
Icon proposition.
@BeckyEbook: Thank you! I've added it.
It can be seen under windows and linux with python 3.4.
Now I wish there was an option to change the default icon of the addon's buttons in Sigil. Maybe in Sigil v1.0?

Quote:
Originally Posted by Auramazda View Post
I sent in PM the italian translation
Grazie mille!

=================

Well, here it is: HTMLgen v0.0.9

Changes in v0.0.9:
  • Added an icon thanks to BeckyEbook.
  • Added Italian language thanks to Auramazda.
  • Added German thanks to brucewelch.
  • Added Galician language. Thank you!
  • Fixed LibreOffice Ctrl+Click problem in some cases.*
  • A few changes in the code to make it a little bit faster.

*Note: It seems that LibreOffice ignores the id inside some tags,
like div, aside, ... ( <div id="...">, <aside id="..."> ...)
so I added a small replacement to fix some of those cases.

Regards.
PeTrDu is offline   Reply With Quote
Old 03-10-2018, 12:04 PM   #21
KevinH
Wizard
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: 2,935
Karma: 1922532
Join Date: Nov 2009
Device: many
Support for plugin supplied quick launch icons is in Sigil master now and will be in the next release.
KevinH is offline   Reply With Quote
Old 03-29-2018, 02:45 PM   #22
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
Small update to v0.1.0:
  • Fixes a bug when copying svg files.
  • Some minor changes in the code.

Regards
PeTrDu is offline   Reply With Quote
Old 04-17-2018, 11:01 PM   #23
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 2334301
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

About images.

When I am using your plugin with an ePub containing several images, they are placed in a folder "files" near the html file.

I think it would save time for the user if your plugin could leave some kind of place holder in the html file (ideally with the name of the image), to pinpoint where an image should be placed.
roger64 is offline   Reply With Quote
Old 04-20-2018, 10:38 AM   #24
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
Quote:
Originally Posted by roger64 View Post
I think it would save time for the user if your plugin could leave some kind of place holder in the html file (ideally with the name of the image), to pinpoint where an image should be placed.
Hi roger64

Not sure if you mean to add something like name="filename" in the img tag (used in LO in its image list navigator),
or maybe the alt="...".
Or something else.



The external files (images, fonts, css...) are always in the same "*_files" folder, that has the same name of the "*.html" file.

...or maybe you want to change the folder name?

Regards
PeTrDu is offline   Reply With Quote
Old 04-20-2018, 09:06 PM   #25
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 2334301
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Sorry for expressing myself in a confuse way.

After using the plugin, all the images that were in the ePub are to be found in the "Files" folder.

Say, you have twenty of them and you have them by their name (Boat.png) or number (img2.png). When you wish to insert them back in the new html file, you'll need some benedictine patience to find where is their expected right place. For this, you'll have to look back in the ePub for each image. It's a tedious process.

If your nice plugin inserted (or left) in the text of the html a basic place holder with the name of the image ("here img2.png"), this task would be much easier.

Last edited by roger64; 04-20-2018 at 09:17 PM.
roger64 is offline   Reply With Quote
Old 04-20-2018, 10:20 PM   #26
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: 18,178
Karma: 93500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sorry roger, I don't know what you're trying to say/ask either.
Quote:
Originally Posted by roger64 View Post
When you wish to insert them back in the new html file, you'll need some benedictine patience to find where is their expected right place. For this, you'll have to look back in the ePub for each image. It's a tedious process.
Why would you need to "insert" the images back into anything? The image links in the newly-generated monolithic html file are are already adjusted properly for every image in the *_files directory. The images are already IN their "expected right place." Opening the html file in a browser will show this. There's no image inserting to be done. And so far as I can tell, the original image file-name is left untouched in the plugin's output. Only the directory path has changed (quite obviously).

@PeTrDu:
I get a syntax error immediately when trying to run v0.1.0 of the plugin on Linux.
Code:
SyntaxError: name 'didFailCopy' is used prior to global declaration
Error: name 'didFailCopy' is used prior to global declaration (plugin.py, line 312)
Moving the "global didFailCopy" line to before the conditional test of didFailCopy's value in the "filecopybin" method alleviates the issue.

From the Python documentation:
Quote:
Names listed in a global statement must not be used in the same code block
textually preceding that global statement.
http://docs.python.org/reference/sim...ts.html#global

Is no else experiencing this?

Last edited by DiapDealer; 04-20-2018 at 10:24 PM.
DiapDealer is online now   Reply With Quote
Old 04-20-2018, 11:55 PM   #27
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 2334301
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
My bad. Sorry about that.

I did it properly again: I saved the ePub as an html file, opened LO with my usual model, inserted the html file, and, indeed the images were here, in their right place.

Thinking about it, my mistake which made the images disappear comes probably because I was not careful enough and did not check that the odt file had been saved in a distinct directory.

OTOH, I never saw the Diap Dealer error message on Linux... Not everything is bad.

Last edited by roger64; 04-20-2018 at 11:58 PM.
roger64 is offline   Reply With Quote
Old 04-21-2018, 03:23 AM   #28
Doitsu
Wizard
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: 4,158
Karma: 12961470
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Code:
SyntaxError: name 'didFailCopy' is used prior to global declaration
Error: name 'didFailCopy' is used prior to global declaration (plugin.py, line 312)
[...] Is no else experiencing this?
I'm getting the same error message on my Arch Linux and Windows machines when I use an external interpreter. (I'm using Python 3.6.3 on my Windows machine and Python 3.6.5 on my Linux machine.)

@DiapDealer: Maybe there are some global declaration changes in Python 3.6.x?

Last edited by Doitsu; 04-21-2018 at 05:29 AM.
Doitsu is offline   Reply With Quote
Old 04-21-2018, 04:30 AM   #29
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 2334301
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
I managed to reproduce the mistake about images.

Explanation

After importing the html file produced by the plugin, images were correctly displayed in the odt file. However they were linked to the external "Files" folder. When I exported to ePub3 using writer2xhtml 1.6 (ODTImport), it broke the external links and the images did not appear in the ePub.

The screenshot below shows the external links in LO (Edit > Links to external files). Four images are linked to my odt file.

All you need to do before exporting to ePub is to "disconnect" (destroy) all these external links and save. Only then you will be able to export to ePub with these images.

I hope this may help somebody in the same situation.
Attached Thumbnails
Click image for larger version

Name:	Liens-odt.png
Views:	23
Size:	20.0 KB
ID:	163585  

Last edited by roger64; 04-21-2018 at 04:43 AM.
roger64 is offline   Reply With Quote
Old 04-21-2018, 06:33 AM   #30
PeTrDu
Member
PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.PeTrDu ought to be getting tired of karma fortunes by now.
 
Posts: 10
Karma: 511654
Join Date: Feb 2018
Device: none
@roger64: Thank you for the explanation!!

@DiapDealer: Nice catch!
Somehow that error didn't show up in some version of Sigil/Python/OS, so I didn't see it.
Thank you!
Quote:
Originally Posted by DiapDealer View Post
From the Python documentation:
Quote:
Names listed in a global statement must not be used in the same code block
textually preceding that global statement.
That explains it, thank you!

@Doitsu: Thank you for testing it! It was a mistake I did.

Change in v0.1.1:
  • Fixed an error with a global variable, thanks to DiapDealer.

Regards.
PeTrDu 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
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 301 02-03-2018 08:35 PM
[Conversion Output] KePub Output Plugin jgoguen Plugins 294 01-02-2018 12:58 AM
[Plugin] KePub Output djazz Plugins 33 01-15-2017 10:25 AM
Plugin debug output DiapDealer Development 4 12-04-2016 09:12 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM


All times are GMT -4. The time now is 01:58 PM.


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