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 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')