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
e96b6f8c
Commit
e96b6f8c
authored
Aug 03, 2020
by
dorp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problem with error code handling
parent
ba94a0ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
docker_entry.py
docker_entry.py
+5
-2
generator.py
pdf_generator/generator.py
+3
-3
main.tex
pdf_generator/templates/default/main.tex
+2
-2
No files found.
docker_entry.py
View file @
e96b6f8c
...
...
@@ -40,8 +40,11 @@ def main(template_style='default'):
with
TemporaryDirectory
()
as
tmp_dir
:
create_templates
(
analysis
,
meta_data
,
tmp_dir
,
template_style
)
target_path
=
compile_pdf
(
meta_data
,
tmp_dir
)
move_pdf_report
(
target_path
)
try
:
target_path
=
compile_pdf
(
meta_data
,
tmp_dir
)
move_pdf_report
(
target_path
)
except
RuntimeError
:
pass
return
0
...
...
pdf_generator/generator.py
View file @
e96b6f8c
import
os
import
shutil
import
sys
from
pathlib
import
Path
from
common_helper_process
import
execute_shell_command_get_return_code
...
...
@@ -17,8 +16,9 @@ def execute_latex(tmp_dir):
os
.
chdir
(
tmp_dir
)
output
,
return_code
=
execute_shell_command_get_return_code
(
'env buf_size=1000000 pdflatex {}'
.
format
(
MAIN_TEMPLATE
))
if
return_code
!=
0
:
print
(
f
'Error when trying to build PDF:
\n
{output}'
)
sys
.
exit
(
1
)
print
(
f
'Warnings / Errors when trying to build PDF:
\n
{output}'
)
if
not
Path
(
'main.pdf'
)
.
exists
():
raise
RuntimeError
(
'No pdf output generated. Aborting.'
)
os
.
chdir
(
current_dir
)
...
...
pdf_generator/templates/default/main.tex
View file @
e96b6f8c
...
...
@@ -41,7 +41,7 @@
\BLOCK
{
endfor
}
\BLOCK
{
endif
}
\BLOCK
{
else
}
No Crypto
Analysis not present
\BLOCK
{
endif
}
}
%----------------------------------------------------------------------------------------
...
...
@@ -53,7 +53,7 @@ No Crypto
\skills
{
\VAR
{
analysis | call
_
for
_
mitigations
}}
\BLOCK
{
endif
}
\BLOCK
{
else
}
\skills
{
No Analysis Done
/1
}
\skills
{
Analysis not present
/1
}
\BLOCK
{
endif
}
\makeprofile
...
...
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