View Single Post
Old 02-26-2018, 06:05 PM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by PeTrDu View Post
Hi!
Here's this small addon: HTMLgen
not sure if it will be of any help to anyone.

Description
Small output addon for Sigil to export the epub contents to one html file...

My purpose was so I can view the text of the epub with LibreOffice+Languagecheker and check any typos with it, then fix it in the epub with Sigil...
but it can be used for whatever you like

Note that it's not a converter (if you want a converter use calibre or another tool).

What does it do exactly?
- it copies only the <body> part of all html/xhtml files, and all the css files.
- it copies all fonts/images/audio/video files to a folder with the same name of the html (+ "_files").
- it makes a few changes to make the internal links work.

Requirements:
Any Sigil version with Python 2.7/3.4 (and tkinker* module), any OS.
* If you have Python, you probably have tkinker module already, but it will warn you if you don't.

Install:
Like any other addon for Sigil, go to "Plugins" menu >>> Manage plugins >>> Add plugin ... and select the HTMLgen_vX.X.X.zip file.
If everything it's OK, it should appear the option in Plugins >>> Output >>> HTMLgen
If you click it, it will only ask you where to save the HTML, and that's all.

Languages: English, Spanish
If you want to, translate this strings to your language and send me an PM, or post it here, so I can add it.
Spoiler:
[en]
htmlfile=HTML file
saveas=Save as HTML...
copied=Copied file: %s
w_nocopy=[WARNING] Cannot copy the file: %s
langload=Language loaded: English
notkinkr=[ERROR] 'tkinker' python module not found.
pyvers=Using Python %s
readmeta=Reading epub metadata...
askfn=Asking for output filename...
cancel=Operation canceled.
openfn=Opening output filename: %s
e_openfn=[ERROR] Couldn't open output filename.
header=Getting ready to write the html header...
reading=Reading %s...
htmsaved=HTML file saved.
newfoldr=Folder created: %s
w_mkdir=[WARNING] Couldn't create output directory: %s
w_nodir=[WARNING] Output directory not found: %s
timespnt=Time spent: %s sec.
htm_warn=HTML file saved with warnings or errors.
htm_ok=HTML file saved successfully.


License: GNU General Public License v3 (GPL-v3)

Download:
See the attached file.

Regards.

Thanks for this. It saves time over merging them all! ;-)

Hitch
Hitch is offline   Reply With Quote