Skip to content

Commit

Permalink
feat(folders): move template out of base and add lang folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Chu authored and chujimmy committed Jun 11, 2021
1 parent 42c2f57 commit 4332efe
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-cv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: >
FILE_PATTERN=${{ steps.output_set.outputs.file_pattern}} &&
counter=0 &&
while [[ $(find . -regextype sed -regex ".*/[a-z]\{2\}/cv.tex" | wc -l ) -gt $(find . -name "$FILE_PATTERN.pdf" | wc -l ) && $counter -le 60 ]]; do
while [[ $(find . -regextype sed -regex ".*/lang/[a-z]\{2\}/cv.tex" | wc -l ) -gt $(find . -name "$FILE_PATTERN.pdf" | wc -l ) && $counter -le 60 ]]; do
echo "Waiting for pdf files to be generated..."
((counter++))
sleep 1
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ LANG_LOWER = $(shell echo $(LANG) | tr A-Z a-z)
.PHONY: add-cv
add-cv:
$(call check_lang)
mkdir ./src/cv/$(LANG_LOWER)/
cp -a ./src/cv/base/. ./src/cv/$(LANG_LOWER)/
mkdir ./src/cv/lang/$(LANG_LOWER)/
cp -a ./src/template/cv/. ./src/cv/lang/$(LANG_LOWER)/

.PHONY: remove-cv
remove-cv:
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

find . -regextype sed -regex ".*/[a-z]\{2\}/cv.tex" | while read fname; do
find . -regextype sed -regex ".*/cv/lang/[a-z]\{2\}/cv.tex" | while read fname; do
latexmk -C -cd $fname
# Could use -interaction=batchmode which seems intended for automated scripts?
latexmk -pdf -pvc -file-line-error -view=none -interaction=nonstopmode -recorder -cd $fname > /proc/1/fd/1 2>/proc/1/fd/2 &
Expand Down
2 changes: 0 additions & 2 deletions src/cv/base/sections/00_header.tex

This file was deleted.

6 changes: 3 additions & 3 deletions src/cv/common/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
\usepackage{xpatch}
\usepackage{xstring}

\input{../common/moderncv_override}
\input{../common/spacing}
\input{../common/style}
\input{../../common/moderncv_override}
\input{../../common/spacing}
\input{../../common/style}
2 changes: 1 addition & 1 deletion src/cv/base/cv.tex → src/cv/lang/en/cv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\moderncvtheme[blue]{classic}

\usepackage[margin=1.55cm]{geometry}
\input{../common/main}
\input{../../common/main}
\input{./sections/00_header}

\nopagenumbers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\input{../common/sections/header}
\input{../../common/sections/header}
\extrainfo{
\begin{tabular}[t]{@{}r@{}}
Date of birth: 01/01/1970 \\
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/cv/fr/cv.tex → src/cv/lang/fr/cv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\moderncvtheme[blue]{classic}

\usepackage[margin=1.55cm]{geometry}
\input{../common/main}
\input{../../common/main}
\input{./sections/00_header}

\nopagenumbers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\input{../common/sections/header}
\input{../../common/sections/header}
\extrainfo{
\begin{tabular}[t]{@{}r@{}}
Date~de~naissance~:~01/01/1970 \\
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/cv/en/cv.tex → src/template/cv/cv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\moderncvtheme[blue]{classic}

\usepackage[margin=1.55cm]{geometry}
\input{../common/main}
\input{../../common/main}
\input{./sections/00_header}

\nopagenumbers
Expand Down
2 changes: 2 additions & 0 deletions src/template/cv/sections/00_header.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\input{../../common/sections/header}
\extrainfo{}
File renamed without changes.
File renamed without changes.

0 comments on commit 4332efe

Please sign in to comment.