def createFullHtml(self, sourceFolder, fileName, targetFolder, technique): sourceFolder = elfFiles.ensureFinalSlash(sourceFolder) self.runPandoc(sourceFolder, fileName) headings = self.makeHeadings(sourceFolder, fileName + '.html', technique) baseName = sourceFolder + fileName; data = self.concatFiles(baseName, headings) tempName = sourceFolder + "Temp.html" elfFiles.saveTextFile(tempName, data); finalName = baseName + '.html'; ReplaceStringInFile.replaceIt(tempName, finalName, 'TempTitleStringToReplace', fileName) crlf.convert(finalName) elfFiles.copyFile(finalName, elfFiles.ensureFinalSlash(targetFolder) + fileName + '.html')
def createFullHtml(self, sourceFolder, fileName, targetFolder): self.runPandoc(sourceFolder, fileName) headings = self.makeHeadings(sourceFolder, fileName + ".htm") data = self.getTemplateFile("StartBasic.html") data += self.getTemplateFile("NavBasic.html") baseName = sourceFolder + os.sep + fileName tempName = sourceFolder + os.sep + "Temp.html" data += elffiles.getFileContent(baseName + ".htm") data += self.getTemplateFile("footer.html") data += self.getTemplateFile("end.html") finalName = baseName + ".html" elffiles.saveTextFile(tempName, data) ReplaceStringInFile.replaceIt(tempName, finalName, "TempTitleStringToReplace", fileName) crlf.convert(finalName)
def createReveal(self, sourceFolder, fileName, targetFolder, technique): sourceFolder = elfFiles.ensureFinalSlash(sourceFolder); self.runPandocReveal(sourceFolder, fileName) headings = self.makeHeadings(sourceFolder, fileName + '.htm', technique) baseName = sourceFolder + fileName; #data = elfFiles.getFileContent(baseName + '.htm') tempName = sourceFolder + fileName + ".htm" skipName = sourceFolder + "temp01.htm" #elfFiles.saveTextFile(tempName, data); finalName = baseName + '.html'; replaceString = '<section id="toc" class="level2">' ReplaceStringInFile.replaceIt(tempName, skipName, 'toc', headings) ReplaceStringInFile.replaceIt(skipName, finalName, 'TempTitleStringToReplace', fileName) crlf.convert(finalName) elfFiles.copyFile(finalName, elfFiles.ensureFinalSlash(targetFolder) + fileName + '.html')