A command-line tool that converts RecipeSage JSON recipe exports to multiple formats: PDF cookbooks and Obsidian-compatible markdown files.
- 🍽️ Hierarchical TOC: Recipes organized by main categories (principal, postre, snack) and subcategories (carnes, pescado, verduras, etc.)
- 📖 Professional Layout: Clean, readable PDF format with proper page structure
- 🔗 Smart Source Links: Readable source formatting with recipe name + website
- 📑 Complete Index: Ingredient index with page references
- 📚 Markdown Format: Individual .md files for each recipe
- 🏷️ Frontmatter: Complete metadata with categories, tags, images, and sources
- 🔗 Obsidian Compatible: Ready to import into Obsidian vaults
- 📁 Organized Structure: Clean file names and folder organization
- ⚡ Simple CLI: Easy-to-use command-line interface
- 🎯 Fast Processing: Efficient batch conversion
npm installConvert a RecipeSage JSON export to PDF:
npm run convert recipes.jsonOr use tsx directly:
npx tsx cli.ts recipes.jsonThe tool will generate a recipe-book.pdf file in the same directory.
Convert a RecipeSage JSON export to Obsidian markdown files:
npm run obsidian recipes.jsonOr use tsx directly:
npx tsx obsidian-converter.ts recipes.jsonThe tool will generate individual .md files in the obsidian_recipes directory (or specify a custom directory as the second argument).
The PDF is organized as follows:
- Title Page: Recipe book cover
- Table of Contents: Hierarchical organization with emoji categories
- Ingredient Index: Alphabetical list of all ingredients with page numbers
- Recipe Pages: Individual recipe details with ingredients, instructions, and source links
Use the JSON export from RecipeSage. The tool expects an array of recipe objects with standard RecipeSage format.
- PDFKit: PDF generation
- TypeScript: Type safety and development
- TSX: TypeScript execution
Build and run:
npm run build
npm run convert your-recipes.json