Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheeler committed Aug 9, 2023
0 parents commit 00d35ed
Show file tree
Hide file tree
Showing 5 changed files with 1,340 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/create-pdf.yml
@@ -0,0 +1,39 @@
name: Create PDF File

on:
workflow_dispatch:
push:
branches:
- main

jobs:
convert_via_pandoc:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3 # this checks out the repo in the ubuntu container
- name: "Create a folder called output"
run: |
mkdir output
cp resume-stylesheet.css output/resume-stylesheet.css
cp resume.md output/${{ github.actor }}-resume.md
# Downloading the binaries directly, because they are newer and work better, than the ones that come with Ubuntu latest.
- name: "Install pandoc and wkhtmltopdf"
run: |
wget https://github.com/jgm/pandoc/releases/download/3.0.1/pandoc-3.0.1-1-amd64.deb
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install ./pandoc-3.0.1-1-amd64.deb
sudo apt install ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb
- name: "Convert MD to HTML"
run: |
pandoc resume.md -f markdown -t html -c resume-stylesheet.css -s -o output/${{github.actor}}-resume.html
- name: "Convert HTML to PDF "
run: "wkhtmltopdf --enable-local-file-access output/${{github.actor}}-resume.html output/${{github.actor}}-resume.pdf"
# run: |
# /usr/bin/pandoc -standalone --output=output/resume.pdf --css=resume-stylesheet.css --from=markdown --to=pdf --pdf-engine=/usr/bin/wkhtmltopdf resume.md
- uses: actions/upload-artifact@master
with: # basically this will put resume.md, resume.html, resume.pdf and resume-stylesheet.css in a zip file.
name: ${{ github.actor }}'s Resume
path: output
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
resume.pdf
resume.html
66 changes: 66 additions & 0 deletions README.md
@@ -0,0 +1,66 @@
# Markdown Resume

This repo allows you to build/maintain your resume in a Markdown file, and then publish it into an HTML or PDF file.
Technically, you could output it into any file you wanted with pandoc, or wkhtmltopdf, but I wasn't interested in those scenarios so I explore those avenues.

The inspiration for this project came from my need to look for a job, my need to update my resume, and my desire not to have to write something in Google docs, or Microsoft Word, so I scoured the web for newer way to build/maintain a resume, while doing so I ran into this [project by Sonya Sawtelle](https://sdsawtelle.github.io/blog/output/simple-markdown-resume-with-pandoc-and-wkhtmltopdf.html).

I modified the CSS for my taste, and noticed that some of the documentation needed to be updated.

Since Sonya's post is nearly five years old, there have been many changes to the command line utilities that she used, so I've updated this README to reflect those changes.

# Workflow

The workflow is pretty simple.

1. Edit the resume.md file.
1. Run pandoc to convert the Markdown file to HTML. OR
1. Run pandoc to convert the Markdown file into a PDF.

The big difference between Sonya's workflow is that if you want, you can convert from MD -> PDF in one step, rather than two. You can still go from MD -> HTML -> PDF, but if you don't want to have an HTML file, you don't have to.

I also don't feel like supporting/using Microsoft Word, so I'm not even trying to output to .docx.

# Updated instructions for a Mac .. or 2021

A lot has changed since Sonya wrote her blog post and shared her workflow, so here are some updates on how to get started and building/updating your own resume.

# Pre-Requisites

## [Pandoc](https://pandoc.org) a universal document converter

```bash
brew install pandoc
```

## [Wkhtmltopdf](https://wkhtmltopdf.org)

```
brew install wkhtmltopdf
```

## Markdown to HTML

```
pandoc resume.md -f markdown -t html -c resume-stylesheet.css -s -o resume.html
```

## Markdown to PDF

```
pandoc resume.md -f markdown -t pdf --pdf-engine=wkhtmltopdf -c resume-stylesheet.css -s -o resume.pdf
```

## HTML to PDF

If you want to convert from HTML to PDF for some reason, you'll need to add a switch to wkhtmltopdf so that it works properly.

```
wkhtmltopdf --enable-local-file-access resume.html resume.pdf
```

# TODO

- [x] [github action](https://github.com/pandoc/pandoc-action-example) will run and create the HTML and PDF file automatically.
- [ ] the Author field in the PDF, it seems to not work when the pdf-engine is set to wkhtmltopdf
- [ ] make a release or a package?

0 comments on commit 00d35ed

Please sign in to comment.