#!/usr/bin/env bash # Workflow script to convert markdown resume to PDF using pandoc set -e INPUT_FILE="resume-example.md" OUTPUT_FILE="resume-example.pdf" TEMPLATE="altacv" echo "Converting resume to PDF..." # Check if input file exists if [ ! -f "$INPUT_FILE" ]; then echo "Error: Input file '$INPUT_FILE' does not exist." exit 1 fi # Convert using pandoc with altacv template for ATS-optimized resume pandoc "$INPUT_FILE" \ -o "$OUTPUT_FILE" \ --template="$TEMPLATE" \ --pdf-engine=xelatex \ --variable "geometry:margin=0.5in" \ --variable "colorlinks:true" \ --variable "linkcolor:blue" \ --variable "urlcolor:blue" if [ $? -eq 0 ]; then echo "Resume successfully converted to '$OUTPUT_FILE'" else echo "Error: Failed to convert resume" exit 1 fi