Skip to content
Permalink
Browse files
Added Files for the Example
  • Loading branch information
aa9863 committed Sep 13, 2018
1 parent 6113aad commit 41d9d5af1757cf8018bf816be968d0b9abea2852
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
@@ -0,0 +1,44 @@
"""
Python script to build a dissertaion based on Markdown / Pandoc
TODO: Options?
"""

import subprocess


# --------------- CHANGE THESE TWO LINES -------------------------
OUTPUT_FILE = "Disso.pdf"

#ENTER ALL THE SOURCE FILES THAT YOU HAVE IN THE DISSERTAION HERE.
SOURCE_FILES = ["Example/EG-Intro.md"]
# --------------- END OF STUFF THAT YOU NEED TO CHANGE -------------------------





def buildCommand():
"""Build the list that we send to pandoc"""
HEADER_FILE = "Dissertation.md"
FOOTER_FILE = "References.md" #Needed otherwise refs come on the same page

PANDOC_OPTS = ["--filter=pandoc-citeproc",
"--template=Template/disso.latex",
"--top-level-division=chapter"]

#Actually Build the list
commandList = ["pandoc"]
commandList.extend(PANDOC_OPTS) #Add the options
commandList.append(HEADER_FILE) #Header File
commandList.extend(SOURCE_FILES) #STUDENT source
commandList.append(FOOTER_FILE) #FOOTER FILE
commandList.append("-o")
commandList.append(OUTPUT_FILE)
print (commandList)
subprocess.run(commandList)


if __name__ == "__main__":
#Build the damm thing
buildCommand()
File renamed without changes.
File renamed without changes.

0 comments on commit 41d9d5a

Please sign in to comment.