# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# LaTeX
## Arch linux
sudo pacman -Sy texlive-core
## Nix env
## Note: This will add texlive globally the current user's env. See the Nix docs for other
## installation methods if this is not desired.
## Note: There are other TexLive packages that may work as well: https://nixos.wiki/wiki/TexLive
nix-env -iA nixpkgs.texlive.combined.scheme-small
## Mac - also may need to add pdflatex to path (located in /Library/TeX/texbin)
brew install --cask basictex
## Ubuntu
sudo apt -y install texlive
# Get the code
git clone --depth 1 https://github.com/spencewenski/resume_generator.git
cargo run -- cargo run -- -i $HOME/Desktop/resume/resume.toml -o resume -d $HOME/Desktop/resume/output
Create a script or alias to run the tool from any directory. Script version:
#!/bin/sh
cargo run --manifest-path $HOME/projects/resume_generator/Cargo.toml -- -i $HOME/projects/resume/resume.toml -o resume -d $HOME/projects/resume/output "$@"
Regenerate the resume when the config file is updated:
# Install inotify-tools first
## Arch linux
sudo pacman -Sy inotify-tools
# https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes
while inotifywait -e close_write resume.toml; do resume; done
tst/test_resume.toml
for a sampleRenderer
trait is implemented for each format
impl Renderer<Resume, String> for TextRenderer
renders the Resume struct to a StringRenderer
trait has type parameters so it can be implemented for each individual element of the resume
impl Renderer<PersonalInfo, String> for TextRenderer
renders the PersonalInfo element to a StringThe first workflow that builds the project and runs the test.
This workflow runs after the build and test workflow completes. It invokes a repository_dispatch
on a separate
repository that contains the resume data (this resume repo can be private). In order to use this workflow in a
fork of this generator package:
API_TOKEN
RESUME_REPO
repository_dispatch
trigger and builds the resume. Sample:
# Renders the resume, archives the artifacts, and updates the GitHub profile
name: Render Resume
on:
push: branches: [ main ] pull_request: branches: [ main ]
workflow_dispatch:
repository_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout resume
uses: actions/checkout@v2
with:
token: ${{ secrets.API_TOKEN }}
- name: Checkout resume generator
uses: actions/checkout@v2
with:
repository: spencewenski/resume_generator
path: resume_generator
- name: Install LaTeX
run: sudo apt -y install texlive
- name: Render resume
working-directory: ./resume_generator
run: cargo run -- -i ../resume.toml -o resume -d ../output
- name: Archive rendered resume
uses: actions/upload-artifact@v2
with:
name: resume
path: output
- You can also update another repo (e.g. your GitHub profile repo) with content generated in the above steps:
```yaml
# ... continued from the above
# Replace placeholders, e.g. 'username', with your data
- name: Checkout profile repo
uses: actions/checkout@v2
with:
repository: username/username
path: username
token: ${{ secrets.API_TOKEN }}
- name: Update profile
working-directory: ./username
run: |
cp ../output/resume-github.md ./README.md
git -c user.name="Your Name" -c user.email="your.email@example.com" commit -am "Update profile" --author="Your Name"
git push origin main