import os from common import call_pandoc, regex_process, listfiles def convert_to_pdf(filename): """ Convert from Markdown to PDF. """ basename, ext = os.path.splitext(filename) print("Converting '{0:s}' to PDF...".format(filename)) filename1 = basename + ".pdf" call_pandoc(filename, filename1, "markdown", "pdf") print("Done!") if __name__ == '__main__': for file in listfiles(): convert_to_pdf(file)
def main(): for file in listfiles(): convert_to_latex(file)
def main(): options = filter(lambda x: not(x.endswith('.md') or x.endswith('.txt')), sys.argv[1:]) for file in listfiles(): convert_to_pdf(file, options=options)
def main(): for file in listfiles(): convert_to_wordpress(file)