try jsonresume

This commit is contained in:
bel
2022-10-17 21:24:23 -06:00
parent 9393801259
commit 5c0ea418d5
5 changed files with 779 additions and 0 deletions

60
json-resume/build.sh Normal file
View File

@@ -0,0 +1,60 @@
#! /bin/bash
main() {
flags "$@"
install
build
}
flags() {
set -e
export THEME="${1:-"flat"}"
}
install() {
install_cli
install_theme
if ! which firefox &> /dev/null; then
sudo apt -y install firefox
fi
}
install_cli() {
if which resume &> /dev/null; then
return
fi
sudo npm install -g resume-cli
which resume
}
install_theme() {
if [ -d node_modules/jsonresume-theme-$THEME ]; then
return
fi
npm install jsonresume-theme-$THEME
}
build() {
if ! [ -f ./resume.json ]; then
resume init
return $?
fi
resume validate
for ext in html pdf; do
resume export resume.$ext --theme $THEME
done
}
log() {
echo "$(date) > $*" >&2
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi