mirror of
https://0xacab.org/anarsec/anarsec.guide.git
synced 2025-06-07 22:32:55 -04:00
layout tweaks
This commit is contained in:
parent
6f33bc5e8d
commit
f4c50a476e
7 changed files with 62 additions and 45 deletions
|
@ -108,6 +108,10 @@ class Converter:
|
|||
# Copy the back image
|
||||
back_image = pathlib.Path(workingDirectory) / "back_image.png"
|
||||
shutil.copy(self.anarsec_root / "static" / "images" / "gay.png", back_image)
|
||||
|
||||
# Copy the header font
|
||||
header_font = pathlib.Path(workingDirectory) / "Jost-Medium.ttf"
|
||||
shutil.copy(self.anarsec_root / "static" / "fonts" / "Jost-Medium.ttf", header_font)
|
||||
|
||||
# Add recommendations to the Markdown content
|
||||
recommendations = re.search(r'\+{3}.*?\+{3}(.*)', recommendations_file.open().read(), re.MULTILINE | re.DOTALL).group(1)
|
||||
|
@ -170,6 +174,9 @@ class Converter:
|
|||
|
||||
# Convert the full typst file to PDF
|
||||
pdf_path = pathlib.Path(workingDirectory) / f"{self.post_id}.pdf"
|
||||
|
||||
os.environ["TYPST_FONT_PATHS"] = str(workingDirectory)
|
||||
|
||||
subprocess.check_call(
|
||||
[str(self.typst_binary), "--root", workingDirectory, "compile", full_typst_path, pdf_path],
|
||||
stderr = subprocess.STDOUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue