Commit b8a23fe0 authored by Jakob Marten's avatar Jakob Marten
Browse files

Move templates to template folder

parent 483a6586
......@@ -15,6 +15,8 @@ OVERRIDE_ACCEPTED = None
FOLDER_RAW = "data/raw/"
FOLDER_RESULT = "data/result/"
FOLDER_TEMPLATES = "templates/"
# Hard coded URL -> Date Mapping in case of invalid or wrong URL. Should be parsed from pad in later versions
URL_DATE_MAPPING = {
"https://pad.finf.uni-hannover.de/finfprotokoll20190903_kvakva": datetime.datetime(2019, 9, 4),
......@@ -182,7 +184,7 @@ class Pad:
os.makedirs(self.getOutFilename().rsplit("/", maxsplit=1)[0], exist_ok=True)
metadataStr = " ".join([f'-M {key}="{val}"' for key, val in self.metadata.items()])
cmd = f'pandoc "{self.getRawFilename()}" {metadataStr} --template="pandoc.{self.type_}.tex" -o "{self.getOutFilename()}"'
cmd = f'pandoc "{self.getRawFilename()}" {metadataStr} --template="{FOLDER_TEMPLATES}pandoc.{self.type_}.tex" -o "{self.getOutFilename()}"'
os.system(cmd)
......@@ -217,7 +219,7 @@ def allPads(pads, topsOnly=False):
d.write(f"{content}\n")
metaDataStr = ""
cmd = f'pandoc "{mergedFilename}" {metaDataStr} --template="pandoc.topics.tex" -o "data/Alle.pdf"'
cmd = f'pandoc "{mergedFilename}" {metaDataStr} --template="{FOLDER_TEMPLATES}pandoc.topics.tex" -o "data/Alle.pdf"'
retCode = os.system(cmd)
if retCode == 0:
os.remove(mergedFilename)
......
......@@ -10,4 +10,4 @@ else
F="finf"
fi
pandoc "$1" --template="pandoc.${F}.tex" -o "${1/${1##*.}}"pdf
pandoc "$1" --template="templates/pandoc.${F}.tex" -o "${1/${1##*.}}"pdf
......@@ -68,9 +68,9 @@
\pagestyle{scrheadings}
\vspace*{-1cm}
\includegraphics[width=0.15\linewidth]{Finf_Logo.pdf}
\includegraphics[width=0.15\linewidth]{img/Finf_Logo.pdf}
\hfill
\includegraphics[width=0.5\linewidth]{LUH_logo.pdf}
\includegraphics[width=0.5\linewidth]{img/LUH_logo.pdf}
\hspace*{-13pt}
\smallskip
......
......@@ -51,9 +51,9 @@
\pagestyle{scrheadings}
\vspace*{-1cm}
\includegraphics[width=0.15\linewidth]{Finf_Logo.pdf}
\includegraphics[width=0.15\linewidth]{img/Finf_Logo.pdf}
\hfill
\includegraphics[width=0.5\linewidth]{LUH_logo.pdf}
\includegraphics[width=0.5\linewidth]{img/LUH_logo.pdf}
\hspace*{-13pt}
\smallskip
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment