huge refactoring

This commit is contained in:
Julien Neuhart
2018-03-29 20:13:19 +02:00
parent 2f97a44bed
commit e847c86baa
24 changed files with 1039 additions and 783 deletions

View File

@@ -1,22 +1,25 @@
# The port the application will listen to.
port: 3000
# Defines the log level.
# Accepted values, in order of severity: DEBUG, INFO, WARN, ERROR, FATAL, PANIC.
# Messages at and above the selected level will be logged.
logLevel: "DEBUG"
logs:
# Accepted values, in order of severity: DEBUG, INFO, WARN, ERROR, FATAL, PANIC.
# Messages at and above the selected level will be logged.
level: "DEBUG"
# Accepted values: text, json.
# When a TTY is not attached, the output will be in the definied format.
format: "text"
# The commands' templates.
commands:
# Available data:
# - FilePath: the path of the file to convert to PDF.
# - ResultFilePath: path of the PDF file created by the command.
HTMLtoPDF: "xvfb-run -e /dev/stdout wkhtmltopdf {{ .FilePath }} {{ .ResultFilePath }}"
# Available data:
# - FilePath: the path of the file to convert to PDF.
# - ResultFilePath: path of the PDF file created by the command.
WordToPDF: "unoconv --format pdf --output \"{{ .ResultFilePath }}\" \"{{ .FilePath }}\""
# Available data:
# - FilePath: the paths of the PDF files to merge.
# - ResultFilePath: path of the PDF file created by the considered command.
MergePDF: "pdftk {{ range $filePath := .FilesPaths }} {{ $filePath }} {{ end }} cat output {{ .ResultFilePath }}"
html:
timeout: 10
template: "xvfb-run -e /dev/stdout wkhtmltopdf {{ .FilePath }} {{ .ResultFilePath }}"
office:
timeout: 10
template: "unoconv --format pdf --output \"{{ .ResultFilePath }}\" \"{{ .FilePath }}\""
merge:
timeout: 10
template: "pdftk {{ range $filePath := .FilesPaths }} {{ $filePath }} {{ end }} cat output {{ .ResultFilePath }}"