def main(argv): index = 0; parser = argparse.ArgumentParser() parser.add_argument('-i', '--index') parser.add_argument('-m', '--markdownTransformConfig') parser.add_argument('-v', dest='verbose', action='store_true') args = parser.parse_args() print("The markdownTransformConfig file is: ", args.markdownTransformConfig) print('The Index is', args.index) markdown = MarkdownToHtml() prog280(markdown, int(args.index), args.markdownTransformConfig)
def testCreateFullHtml(self): markdown = MarkdownToHtml() fileName = 'TestMe' markdown.createFullHtml(os.getcwd(), fileName, elffiles.getHomeDir() + os.sep + 'Temp', self.normalHtml)
def testGetTemplateFile(self): markdown = MarkdownToHtml() fileContent = markdown.getTemplateFile('StartBasic.html') self.assertEqual(len(fileContent), 887)
def testMakeHeadings(self): markdown = MarkdownToHtml() fileContent = markdown.makeHeadings(os.getcwd(), "TestMe.htm", self.normalHtml) self.assertEqual(len(fileContent), 114)
def testRunPanDoc(self): markdown = MarkdownToHtml() actual = markdown.runPandoc('.', 'TestMe') expected = 0 self.assertEqual(actual, expected)
def testCreateFullHtml(self): markdown = MarkdownToHtml() fileName = 'TestMe' markdown.createFullHtml(os.getcwd(), fileName, elffiles.getHomeDir() + os.sep + 'Temp')
def testGetTemplateFile(self): markdown = MarkdownToHtml() fileContent = markdown.getTemplateFile('StartBasic.html'); self.assertEqual(len(fileContent), 887)
def testMakeHeadings(self): markdown = MarkdownToHtml() fileContent = markdown.makeHeadings(os.getcwd(), "TestMe.htm") self.assertEqual(len(fileContent), 114)
# Site Root # You may need to change the stackEditFrom path depending on your setup stackEditFrom = os.environ['HOME'] + '/Dropbox/StackEdit' bcTo = '/var/www/bc' normalHtml = 0 revealHtml = 1 # process and Copy the files def makeItSo(markdown, folder, files, technique=normalHtml): markdown.copyFrom = stackEditFrom markdown.destination = bcTo elffiles.ensureDir(markdown.destination) if technique == revealHtml: markdown.runReveal(files) else: markdown.runner( files, ['StartLinux.html', 'NavLinux.html', 'footer.html', 'end.html']) # Prog270 def prog280(markdown): files = ["DropBox", "MongoMark", "index"] makeItSo(markdown, "", files) # Run Program markdown = MarkdownToHtml() prog280(markdown)