added typst as doc creator and put it into compose container
This commit is contained in:
@@ -72,7 +72,7 @@ func renderPDF(days []typstDay, metadata typstMetadata) (bytes.Buffer, error) {
|
||||
// Import the template and invoke the template function with the custom data.
|
||||
// Show is used to replace the current document with whatever content the template function in `template.typ` returns.
|
||||
markup.WriteString(`
|
||||
#import "template.typ": abrechnung
|
||||
#import "templates/abrechnung.typ": abrechnung
|
||||
#show: doc => abrechnung(meta, days)
|
||||
`)
|
||||
|
||||
@@ -84,7 +84,10 @@ func renderPDF(days []typstDay, metadata typstMetadata) (bytes.Buffer, error) {
|
||||
// defer f.Close()
|
||||
//
|
||||
|
||||
typstCLI := typst.CLI{}
|
||||
// typstCLI := typst.CLI{}
|
||||
typstCLI := typst.DockerExec{
|
||||
ContainerName: helper.GetEnv("TYPST_CONTAINER", "arbeitszeitmessung-doc-creator"),
|
||||
}
|
||||
if err := typstCLI.Compile(&markup, &output, nil); err != nil {
|
||||
return output, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user