mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-05 20:38:26 +02:00
Merge pull request #103 from matsavage/latex_environment
adds DnD tempate as submodule
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import logging
|
||||
@@ -65,11 +66,17 @@ def create_latex_pdf(
|
||||
"-interaction=nonstopmode",
|
||||
tex_file,
|
||||
]
|
||||
|
||||
environment = os.environ
|
||||
tex_env = environment.get('TEXINPUTS', '')
|
||||
module_directory = str(Path(__file__).parent)
|
||||
environment['TEXINPUTS'] = f".:{module_directory}/modules//:" + tex_env
|
||||
|
||||
passes = 2 if use_dnd_decorations else 1
|
||||
try:
|
||||
for i in range(passes):
|
||||
result = subprocess.run(
|
||||
tex_command_line, stdout=subprocess.DEVNULL, timeout=30
|
||||
tex_command_line, stdout=subprocess.DEVNULL, env=environment, timeout=30
|
||||
)
|
||||
except FileNotFoundError:
|
||||
# Remove temporary files
|
||||
|
||||
+1
Submodule dungeonsheets/modules/DND-5e-LaTeX-Template added at 2c94ab9795
Reference in New Issue
Block a user