Typst+python Magazine builder

I have created a “magazine builder”, which enables me to create magazines using typst as a basis for the content. Currently, there is only one type of magazine implemented and only one output type, but more will come in the future. There is also only no repo so far.

The yaml doc block handles all the heavy work. Like: what is this piece to be in the edition; review or interview or … The idea is to shift all the heavy-duty work from me to a defined process that deals with the creation. 5 editions can be build by a designated pipeline one after the other, with more editions and magazine variants planned. Later today I want to release the magazine, but maybe one additional interview may pop-up and I still need to write the introduction.

What needs to be done (in terms of Typst):

  • a nice way to add better page breaks.
  • other output templates (mobile and the sort)
  • custom design and looks

// —
// CONTENT_TYPE
// type: interview
//
// BAND_INFO
// band: Bellaras
// release: 2026
// release_translated:
// year_release:
// country: UK
// genres: [Funeral Doom Metal]
// subgenres:
//
// LINKS_BAND
// link_bandcamp:
// link_bandcamp_release:
// link_youtube:
// link_website:
// link_social:
// link_spotify:
//
// LINKS_PUBLICATION
// link_ia:
// link_ma:
// link_substack:
// link_payhip:
//
// REVIEW_DATA
// date_written: 2026-03
// date_published: 2026-03
// tag_edition: 2026_1|year
// tag_year: 2026
// tag_mag_type: adsol
// ai_assisted: true
// length_category: short
// academic_style: false
// archived: false
// legacy: false
// qr_path:
//
// TYPE_SPECIFIC
// ma_review_title:
// ma_rating:
// —

python3 -m edition_compiler --edition 2026_1
Workspace root: /workspace
Edition path: /workspace/magazines/adsol/editions/edition_2026_1
Config loaded: /workspace/magazines/adsol/editions/edition_2026_1/config.yaml

============================================================
Edition Compiler V2
Edition: 2026_1

Stage 0: Environment Check

✓ Edition directory: /workspace/magazines/adsol/editions/edition_2026_1
✓ Exists: /workspace/build/magazines/adsol/editions/edition_2026_1/normal
✓ Created: /workspace/build/magazines/adsol/editions/edition_2026_1/mobile
✓ Output directory: /workspace/output/editions/edition_2026_1
✓ Config file: /workspace/magazines/adsol/editions/edition_2026_1/config.yaml
✓ Stage 0: Environment Check completed successfully

Stage 1: File Discovery

✓ Introduction: /workspace/magazines/adsol/editions/edition_2026_1/0_Introduction/introduction.typ (5 bytes)

Scanning for content files…
✓ Found 25 valid content files

Content Breakdown:

Interview + Review (2 bands):
- Bellaras
Interview: Bellaras_2026_answers.typ
Review: Bellaras__The_Thousand_Tombs_Of_A_Broken_God.typ
- Judu
Interview: Judu_2026_answers.typ
Review: Judu__2021_Drungnas.typ

Interview Only (2 bands):
- Disemballerina: Disemballerina_2026_answers.typ
- Rahel Talts: Rahel_Talts__2026_answers.typ

Reviews & Poetry (17 items):
- Aija Alsiņa: Aija_Alsina__2025_Lightkeeper.typ
- Elpus: Elpus__2021_Un_ja_tu.typ
- In Ruins: In_Ruins__2022_Ruthless_Portrait.typ
- Jaunība: Jauniba__2025_Dazi_racionali_apsverumi.typ
- Kadath: Kadath__2025_Nightmare_Quest.typ
- Kælan Mikla: Kaelan_Mikla__2021_Osynileg.typ
- Kārlis Auziņš / Rihards Plešanovs: collab_Karlis_Auzins__Rihards_Plesanovs__Still_Nature.typ
- Liminal Erosion: Liminal_Erosion__2025_Spectral_Thrumm.typ
- Low Cunning (poetry): Low_Cunning__Inventory_of_the_Shitty_Wizard.typ
- Monovoth: Monovoth__2026_To_Live_in_the_Breath_of_Worship.typ
- Nebel Lang: Nebel_Lang__2025_Werkstatt_Konzert.typ
- Nevers: Nevers__2026_Sic_Volitum.typ
- Nevers: Nevers__2026_Twilight.typ
- Nightshroud: Nightshroud__2025_havenpunk.typ
- Pletyka: Pletyka__2023_Demo.typ
- Pletyka: Pletyka__2026_Kedves_Kis_Gonoszsagok.typ
- Sojourner: Sojourner__2024_Epitaphs.typ
- Sárkánygarbó: Sarkanygarbo__2026_Tiszan_innen.typ
- Wapstan: Wapstan__2026_Le_Nord.typ

Checking for images…
✓ Cover image: /workspace/magazines/adsol/editions/edition_2026_1/images/cover.png

✓ Stage 1: File Discovery completed successfully

Stage 2: Publication Check

✓ All edition files are in final location
✓ Stage 2: Publication Check completed successfully

Stage 3: QR Validation

Found 5 URL(s) flagged for QR generation:
✓ Ready: 5
:warning: Warnings: 0
✗ Errors: 0
✓ All QR codes can be generated successfully

Stage 4: QR Generation

QR Code Generation Results:
✓ Generated: 5
✗ Failed: 0

✓ Generated QR codes in: …

Stage 5: Edition Generation

Build directory: /workspace/build/magazines/adsol/editions/edition_2026_1
Temporary files: /workspace/build/magazines/adsol/editions/edition_2026_1/tmp_files

DEBUG: workspace_root = /workspace
DEBUG: Looking for template registry at: /workspace/typst/templates/templates.yaml
DEBUG: Registry exists? True
DEBUG: Template path from registry: typst/templates/base
DEBUG: Absolute template path: /workspace/typst/templates/base
DEBUG: Template path exists? True
Template: adsol_standard vv1
Path: /workspace/typst/templates/base

Copying content files to build directory…
Copied 25 files to build directory

Content organization:
Interview + Review: 2 pairs
Interview only: 2
Reviews & Poetry: 19

Generated: /workspace/build/magazines/adsol/editions/edition_2026_1/edition_data.typ
Generated: /workspace/build/magazines/adsol/editions/edition_2026_1/toc_data.typ
Created: /workspace/build/magazines/adsol/editions/edition_2026_1/main.typ
DEBUG: rel_build_path = …
DEBUG: rel_template_path = …/…/…/…/…/…/typst/templates/base
Deployed to: normal/

✓ Edition files generated successfully

Stage 5a: Nerd Data - Genres & Countries

:information_source: Countries: 13 unique
:information_source: Genres: 29 unique
✓ Written: build/nerd_data/genres_countries.typ

Stage 5b: Nerd Data - Linguistic Analysis

:information_source: Analysed 21 files (reviews + poetry)
✓ Written: build/nerd_data/nerd_*.typ + nerd_summary.typ

Stage 6: Build Outputs

Formats: pdf
Variants: normal

Building NORMAL variant

Compiling normal/edition.typ…
DEBUG: workspace_root = /workspace
DEBUG: typ_file = /workspace/build/magazines/adsol/editions/edition_2026_1/normal/edition.typ
[OK] Generated edition.pdf (2.17 MB)
[OK] Copied to output/edition.pdf

✓ All outputs compiled successfully

Stage 8: Perform Postprocessing

Processing: edition.pdf
✓ Validation passed: Valid PDF
✓ Backup created: edition.pdf.backup
✓ Optimized: 2.17 MB → 0.25 MB (88.5% reduction)
✓ Post-processed 1 file(s)

All stages completed successfully!