Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I went to 11 with this auto-render thing
- Loading branch information
1 parent
267d8eb
commit de069a6
Showing
8 changed files
with
53 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ROOTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
|
||
.PHONY: resume | ||
.DEFAULT: resume | ||
|
||
resume: resume.pdf resume/index.html | ||
|
||
resume.pdf: resume/resume.adoc resume/index.adoc | ||
@script/resume-pdf | ||
|
||
resume/index.html: resume/resume.adoc resume/index.adoc | ||
@script/resume-html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# Run this using Foreman via `foreman start` | ||
# See: https://github.com/ddollar/foreman | ||
web: jekyll server start | ||
resume: ./render-resume | ||
blog: jekyll server start | ||
resume: script/autorenderer |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# In case something changed before this script started | ||
make resume | ||
|
||
# Requires fswatch https://github.com/emcrisostomo/fswatch | ||
# `brew install fswatch` | ||
|
||
# This loop was inspired by https://superuser.com/a/181543/774060 | ||
fswatch -x ./resume | | ||
while read -r path events; do | ||
filename=$(basename "$path") | ||
extension="${filename##*.}" | ||
|
||
if [ "$extension" = "adoc" ]; then | ||
echo "Source file changed: $filename" | ||
make resume | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
cd $(dirname "${BASH_SOURCE[0]}")/.. | ||
asciidoctor --base-dir ./ resume/index.adoc | ||
echo " rendered resume/index.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
cd $(dirname "${BASH_SOURCE[0]}")/.. | ||
asciidoctor-pdf --base-dir ./ --destination-dir ./ --out-file resume.pdf resume/index.adoc | ||
echo " rendered ./resume.pdf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Run this via `./start` | ||
|
||
if hash foreman 2>/dev/null; then | ||
foreman start | ||
else | ||
echo "===============================================" | ||
echo "Please install Foreman before proceeding" | ||
echo "More info at https://github.com/ddollar/foreman" | ||
echo "===============================================" | ||
fi |