Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
pter
Commits
b8a23fe0
Commit
b8a23fe0
authored
Jun 17, 2020
by
Jakob Marten
Browse files
Move templates to template folder
parent
483a6586
Changes
9
Hide whitespace changes
Inline
Side-by-side
linkToPDF.py
View file @
b8a23fe0
...
...
@@ -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
)
...
...
makepdf.sh
View file @
b8a23fe0
...
...
@@ -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
FR_Informatik_LUH.png
→
templates/img/
FR_Informatik_LUH.png
View file @
b8a23fe0
File moved
Finf_Logo.pdf
→
templates/img/
Finf_Logo.pdf
View file @
b8a23fe0
File moved
LUH_logo.pdf
→
templates/img/
LUH_logo.pdf
View file @
b8a23fe0
File moved
pandoc.attachement.tex
→
templates/
pandoc.attachement.tex
View file @
b8a23fe0
...
...
@@ -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
...
...
pandoc.finf.tex
→
templates/
pandoc.finf.tex
View file @
b8a23fe0
...
...
@@ -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
...
...
pandoc.fsr.tex
→
templates/
pandoc.fsr.tex
View file @
b8a23fe0
File moved
pandoc.topics.tex
→
templates/
pandoc.topics.tex
View file @
b8a23fe0
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment