USER=paul FILE_NAME?=paul-halvorsen-resume TEMPLATE?=jb2resume-modern NAME=localhost/build-paul-resume CONTAINER_NAME=build-paul-resume-container USER_ID=$(shell id -u ${USER}) GROUP_ID=$(shell id -g ${USER}) CONTAINER_EXISTS=0 ifneq ("$(shell podman images -q ${NAME} 2> /dev/null)","") CONTAINER_EXISTS=1 endif # Available templates: # - jb2resume: Classic template (original) # - jb2resume-modern: Improved with better spacing and typography # - awesome-cv: Modern Awesome-CV based template .PHONY: resume resume-modern resume-awesome resume-ats cover-letter help clean cleanpaper cleanpodman cleanall cover-letter: .podman-build podman run --rm \ --volume "$(realpath .)":/data \ --name ${CONTAINER_NAME} \ ${NAME} \ ${FILE_NAME}.md -f markdown --template templates/cover-letter.latex -o ${FILE_NAME}.pdf @echo "✓ Generated ${FILE_NAME}.pdf (cover letter)" resume-ats: TEMPLATE=jb2resume-ats resume-ats: .podman-build podman run --rm \ --volume "$(realpath .)":/data \ --name ${CONTAINER_NAME} \ ${NAME} \ ${FILE_NAME}.md -f markdown+yaml_metadata_block --template templates/jb2resume-ats.latex -o ${FILE_NAME}.pdf @echo "✓ Generated ${FILE_NAME}.pdf (template: jb2resume-ats)" resume: TEMPLATE=jb2resume resume: .podman-build podman run --rm \ --volume "$(realpath .)":/data \ --name ${CONTAINER_NAME} \ ${NAME} \ ${FILE_NAME}.md -f markdown+yaml_metadata_block --template templates/${TEMPLATE}.latex -o ${FILE_NAME}.pdf @echo "✓ Generated ${FILE_NAME}.pdf (template: ${TEMPLATE})" resume-modern: TEMPLATE=jb2resume-modern resume-modern: .podman-build podman run --rm \ --volume "$(realpath .)":/data \ --name ${CONTAINER_NAME} \ ${NAME} \ ${FILE_NAME}.md -f markdown+yaml_metadata_block --template templates/jb2resume-modern.latex -o ${FILE_NAME}.pdf @echo "✓ Generated ${FILE_NAME}.pdf (template: jb2resume-modern)" resume-awesome: TEMPLATE=awesome-cv resume-awesome: .podman-build podman run --rm \ --volume "$(realpath .)":/data \ --name ${CONTAINER_NAME} \ ${NAME} \ ${FILE_NAME}.md -f markdown+yaml_metadata_block --template templates/awesome-cv.latex -o ${FILE_NAME}.pdf @echo "✓ Generated ${FILE_NAME}.pdf (template: awesome-cv)" .podman-build: if [ ${CONTAINER_EXISTS} -ne 1 ]; then podman build -t ${NAME} . && echo "" > .podman-build; fi help: @echo "Resume Builder - Available Commands:" @echo "" @echo "Default (modern template with better spacing):" @echo " make resume FILE_NAME=path/to/resume" @echo "" @echo "Templates:" @echo " make resume FILE_NAME=path/to/resume # Classic jb2resume" @echo " make resume-modern FILE_NAME=path/to/resume # Modern improved template" @echo " make resume-awesome FILE_NAME=path/to/resume # Awesome-CV inspired template" @echo " make resume-ats FILE_NAME=path/to/resume # ATS-optimized single-column" @echo "" @echo "Examples:" @echo " make resume-modern FILE_NAME=files/paul-halvorsen-files-backend-engineer" @echo " make resume-awesome FILE_NAME=valon/paul-halvorsen-valon-software-engineer" @echo "" @echo "Cleanup:" @echo " make clean # Remove LaTeX log files" @echo " make cleanpaper # Remove generated PDF" @echo " make cleanpodman # Remove Podman image" @echo " make cleanall # Remove everything" cleanpaper: rm -f ${FILE_NAME}.pdf cleanpodman: @echo "Cleanup files and podman" if [ ${CONTAINER_EXISTS} -ne 0 ]; then podman image rm -f ${NAME} && rm -f .podman-build; fi clean: find . -name "*.log" -type f -delete cleanall: clean cleanpaper cleanpodman @echo "Cleanup everything"