# -*- coding: utf-8 -*- """novelWriter HTML File novelWriter – HTML File ========================= Writes the project to a html file File History: Created: 2019-10-19 [0.3] """ import logging import nw from nw.convert.file.text import TextFile from nw.convert.text.tohtml import ToHtml from nw.enum import nwAlert logger = logging.getLogger(__name__) class HtmlFile(TextFile): def __init__(self, theProject, theParent): TextFile.__init__(self, theProject, theParent) self.theConv = ToHtml(self.theProject, self.theParent) return ## # Internal Functions ## def _doOpenFile(self, filePath): try: self.outFile = open(filePath,mode="wt+",encoding="utf8") self.outFile.write("\n") self.outFile.write("\n") self.outFile.write("
\n") self.outFile.write(" \n") self.outFile.write(" \n") self.outFile.write("\n") self.outFile.write("\n") self.outFile.write("