Remix.run Logo
thangalin 10 hours ago

In tough job markets, submitting 100 résumés before getting hired is not uncommon. Of possible interest is my Creating Catchy Cover Letters blog post, which uses my Markdown editor, KeenWrite (https://keenwrite.com), to create PDF files styled to match a company's branding:

https://keenwrite.com/blog/2025/10/15/creating-catchy-cover-...

A handful of prospective managers told me that my cover letter stood out among hundreds of applicants.

Here's the full shell script I used to build cover letters (you'll need to point "theme dir" to the directory where the cover letter theme---aspiros---is found). With this script, creating a cover letter went from about 20 minutes down to 5. If you have any troubles getting it to work, contact me via https://whitemagicsoftware.com/.

    #!/usr/bin/env bash

    # This script builds a cover letter based on a company's branding. The
    # parameters include:
    #
    # $1 -- The company name as a directory, containing colours and logo.
    # $2 -- The company name (normal case).
    # $3 -- The company role (job title).
    # $4 -- The relative path to the cover letter to typeset.
    #
    # Example:
    #
    # ./build.sh corp Corporation 'Job Title' template/cover-letter.md

    readonly SCRIPT_SRC="$(dirname "${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}")"
    readonly SCRIPT_DIR="$(cd "${SCRIPT_SRC}" >/dev/null 2>&1 && pwd)"

    readonly COMPANY_DIR="${1:-template}"
    readonly COMPANY_NAME="${2:-Template}"
    readonly COMPANY_ROLE="${3:-Job Title}"
    readonly PATH_COVER_LETTER="${4:-climate/cover-letter.md}"
    readonly EMPLOYEE_NAME="${5:-Your Name}"
    readonly EMPLOYEE_ROLE="${6:-Your Role}"

    read -r COLOUR_FG COLOUR_BG COLOUR_AC < "$COMPANY_DIR/colours.txt"
    readonly COLOUR_FG COLOUR_BG COLOUR_AC

    magick \
      signature-black.png \
      -alpha extract \
      -background "#${COLOUR_AC}" \
      -alpha shape \
      -define png:color-type=6 \
      signature.png

    rm -f ${HOME}/.local/share/keenwrite/logo_svg_*.pdf

    keenwrite.bin \
      -i "${PATH_COVER_LETTER}" \
      -o cover-letter.pdf \
      --set=employer.company.name="${COMPANY_NAME}" \
      --set=employer.position.role="${COMPANY_ROLE}" \
      --set=employee.name="${EMPLOYEE_NAME}" \
      --set=employee.role="${EMPLOYEE_ROLE}" \
      --set=employee.contact.phone="555-1212" \
      --set=employee.contact.email="email@hostname" \
      --set=employee.portfolio.url="gitlab.com/YourName" \
      --set=employee.address.line.1="address 1" \
      --set=employee.address.line.2="city, province" \
      --set=employee.address.line.3="postal code" \
      --metadata="foreground=${COLOUR_FG}" \
      --metadata="background=${COLOUR_BG}" \
      --metadata="accent=${COLOUR_AC}" \
      --image-dir="${SCRIPT_DIR}/${COMPANY_DIR}" \
      --theme-dir="${HOME}/dev/java/keenwrite/themes/aspiros"

    exiftool \
      -overwrite_original_in_place \
      -Title="${EMPLOYEE_NAME}" \
      -Author="${EMPLOYEE_NAME}" \
      cover-letter.pdf
This saved me about 19 hours of work; hopefully it will save you time, as well. See also: https://xkcd.com/1205/