Skip to content
approved Visibility internal Owner _ Approver _ Created _ Updated _

Uvilo Method Release

Purpose

Format and publish a new dated version of “The Uvilo Method” document.

When to Use

  • User says “release The Uvilo Method” or “publish new Uvilo Method version”
  • User references updating/formatting The Uvilo Method document

Prerequisites

  • pandoc installed (confirmed at /usr/local/bin/pandoc)
  • weasyprint installed (confirmed at /usr/local/bin/weasyprint)
  • Google Drive for Desktop running (Shared drives mounted)
  • Fonts directory must exist at {ORG}/Assets/fonts/ with required font files (SofiaSans, Exo2 variants)
    • If missing, PDF generation will fail with error: withBinaryFile: does not exist
    • CSS references fonts via relative path ../fonts/ from Themes folder

Constants

SOURCE_FOLDER={PRODUCT}/Uvilo_Method
SOURCE_FILE=The_Uvilo_Method.md
CSS_FILE=${FORGE}/Skills/Markdown_To_PDF/Assets/uvilo.css

How to Run

Automated

bash {PRODUCT}/Uvilo_Method/Skills/Uvilo_Method_Release/scripts/release.sh

Or with a specific date:

bash {PRODUCT}/Uvilo_Method/Skills/Uvilo_Method_Release/scripts/release.sh 2026-03-01

What the Script Does

  1. Duplicate source → The Uvilo Method {DATE}.md
  2. Stamp version — replaces Version: YYYY-MM-DD with current date
  3. Generate GitHub-flavor TOC — replaces \[\[Table of Contents]] in the .md with GitHub-style anchors (keeps leading numbers)
  4. Create pandoc temp file — a second copy with pandoc-compatible TOC anchors (strips leading numbers) used only for PDF/DOCX generation
  5. Generate PDF — via pandoc + weasyprint with uvilo.css theme (from pandoc temp file)
  6. Generate DOCX — via pandoc from pandoc temp file (Google Drive auto-converts to Google Docs)
  7. Copy outputs to:
    • {SOURCE_FOLDER}/.../The Uvilo Method {DATE}/

Notes

  • Native .gdoc cannot be created locally. The .docx placed in Google Drive auto-converts.
  • The .md file uses GitHub-flavor TOC anchors (keeps leading heading numbers like 1., 1.1). PDF and DOCX are generated from a temporary pandoc-compatible copy (strips leading numbers to match pandoc’s auto-generated IDs).
  • GitHub-flavor anchors preserve Unicode characters (like ° in “360°”) to match modern markdown viewers (Cursor, VS Code, etc.)
  • TOC only includes H1 and H2 headings.
  • Working directory for pandoc is SOURCE_DIR (so relative CSS paths work).
  • generate-toc.ts accepts --style github (default) or --style pandoc.

Troubleshooting & Known Issues

PDF Generation Errors

Anchor warnings (cosmetic, non-breaking):

  • Error: No anchor #uvilo-360°-life-review for internal URI reference
  • Cause: weasyprint/pandoc generate different anchor IDs than GitHub-style TOC links
  • Impact: PDF renders correctly; only in-PDF navigation from TOC links is affected
  • Resolution: This is expected behavior and can be ignored

Missing fonts error:

  • Error: withBinaryFile: does not exist (No such file or directory) for font files
  • Cause: Fonts directory missing at {ORG}/Assets/fonts/
  • Resolution: Ensure fonts directory exists with required SofiaSans and Exo2 font files

TOC Anchor Generation

Pandoc anchor ID rules:

  • Pandoc strips leading section numbers (e.g., 1., 1.1, 4.2.) from heading anchor IDs
  • Pattern: ^[\d]+(?:\.[\d]+)*\.?\s+
  • TOC generators must match this behavior for consistent anchors

Unicode handling:

  • Modern markdown viewers (Cursor, VS Code) preserve Unicode characters (like °) in anchor IDs
  • Use specific punctuation removal (periods, commas, quotes, brackets) rather than blanket non-word character removal
  • Matches CommonMark behavior

Script Development Notes

Bash heredoc limitations:

  • Unquoted heredoc delimiters (<< EOF) interpret backticks as command substitution
  • When embedding code containing backticks, extract to separate file and call it instead
  • Prevents command substitution issues in embedded Python/code blocks