Skip to content

Instantly share code, notes, and snippets.

@zsviczian
zsviczian / Process - Build Book.md
Last active October 7, 2025 17:54
Publishing Workflow: Obsidian, Pandoc, Calibre: EPUB, PDF, TXT

<%* /*

/**
 * Obsidian Templater script to build a book from markdown files.
 * 
 * This script automates the process of generating a publish-ready book from a set of Obsidian markdown files.
 * It is designed to work on both Windows and Mac, and can be run from within Obsidian using the Templater plugin.
 * 
 * The script performs the following steps:
 *   1. Expands all Obsidian embeds and links, recursively flattening the book structure into two markdown files: