Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fact_pdf_report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
fact_pdf_report
Commits
3f60b8a8
Commit
3f60b8a8
authored
Jun 08, 2020
by
lwilms
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new template
parent
224944db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
generator.py
pdf_generator/generator.py
+5
-5
No files found.
pdf_generator/generator.py
View file @
3f60b8a8
...
...
@@ -20,7 +20,7 @@ def execute_latex(tmp_dir):
def
copy_fact_image
(
target
):
shutil
.
copy
(
str
(
Path
(
__file__
)
.
parent
/
'templates'
/
LOGO_FILE
),
str
(
Path
(
target
)
/
LOGO_FILE
))
shutil
.
copy
(
str
(
Path
(
__file__
)
.
parent
/
'templates'
/
'new_template'
/
LOGO_FILE
),
str
(
Path
(
target
)
/
LOGO_FILE
))
def
render_analysis_templates
(
engine
,
analysis
):
...
...
@@ -49,8 +49,8 @@ def create_templates(analysis, meta_data, tmp_dir, template_style=None):
Path
(
tmp_dir
,
MAIN_TEMPLATE
)
.
write_text
(
engine
.
render_main_template
(
analysis
=
analysis
,
meta_data
=
meta_data
))
Path
(
tmp_dir
,
META_TEMPLATE
)
.
write_text
(
engine
.
render_meta_template
(
meta_data
))
if
template_style
:
if
template_style
==
'new_template'
:
Path
(
tmp_dir
,
CUSTOM_TEMPLATE_CLASS
)
.
write_text
(
engine
.
render_template_class
())
for
filename
,
rendered_template
in
render_analysis_templates
(
engine
=
engine
,
analysis
=
analysis
):
Path
(
tmp_dir
,
filename
)
.
write_text
(
rendered_template
)
else
:
for
filename
,
rendered_template
in
render_analysis_templates
(
engine
=
engine
,
analysis
=
analysis
):
Path
(
tmp_dir
,
filename
)
.
write_text
(
rendered_template
)
Write
Preview
Markdown
is supported
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