From 050c155a5eaef40ea7220cd3d5080bcabf3b07be Mon Sep 17 00:00:00 2001 From: Eugene Leonovich Date: Fri, 19 Apr 2024 02:16:35 +0200 Subject: [PATCH] Add files --- .github/workflows/ci.yml | 46 +++++++++++++++ .gitignore | 2 + LICENSE | 21 +++++++ Makefile | 58 ++++++++++++++++++ README.md | 70 +++++++++++++++++++++- profile.yml | 118 +++++++++++++++++++++++++++++++++++++ templates/cv.html | 89 ++++++++++++++++++++++++++++ templates/cv.md | 74 +++++++++++++++++++++++ templates/pdf.override.tex | 17 ++++++ 9 files changed, 494 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 profile.yml create mode 100644 templates/cv.html create mode 100644 templates/cv.md create mode 100644 templates/pdf.override.tex diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c00accd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Generate CVs + +on: + workflow_dispatch: + push: + +# env: +# CV_FILENAME: J_Codemaster_CV + +jobs: + generate: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout Repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra + pip install jinja2-cli + + - name: Generate CVs + run: make cv && ls -l output + + - name: Retrieve Version + id: version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "PREFIX=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT + echo "HASH=$(find output -type f -exec md5sum {} \; | sort -k 2 | cksum | awk '{print $1;}')" >> $GITHUB_OUTPUT + echo "PREV_HASH=$(gh release list --limit 1 --json 'tagName' --jq '.[].tagName | split(".")[-1]')" >> $GITHUB_OUTPUT + + - name: Create Release + if: steps.version.outputs.HASH != steps.version.outputs.PREV_HASH + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: v${{ steps.version.outputs.PREFIX }}.${{ steps.version.outputs.HASH }} + run: | + gh release create "$TAG" --title "$TAG" + gh release upload "$TAG" output/* + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb3c308 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/output +/.pdf.override.tex diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c143479 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Eugene Leonovich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..41472c9 --- /dev/null +++ b/Makefile @@ -0,0 +1,58 @@ +SHELL := $(shell which bash) +CV_FILENAME ?= cv + +clr_error := $(shell tty -s > /dev/null 2>&1 && tput setaf 1) +clr_comment := $(shell tty -s > /dev/null 2>&1 && tput setaf 2) +clr_info := $(shell tty -s > /dev/null 2>&1 && tput setaf 3) +clr_reset := $(shell tty -s > /dev/null 2>&1 && tput sgr0) + +root_dir := $(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))") +templates_dir := $(root_dir)/templates +output_dir := $(root_dir)/output + +define help +$(clr_info)Usage:$(clr_reset) + make [target] + +$(clr_info)Targets:$(clr_reset) + clean $(clr_comment)Remove previously generated CVs (if any)$(clr_reset) + cv $(clr_comment)Generate CVs in all supported formats$(clr_reset) + cv-pdf $(clr_comment)Generate CV in PDF format$(clr_reset) + cv-md $(clr_comment)Generate CV in Markdown format$(clr_reset) + cv-html $(clr_comment)Generate CV in HTML format$(clr_reset) +endef + +.PHONY: help +help: + @echo $(info $(help)) + +"$(output_dir)": + @mkdir -p "$(output_dir)" + +.PHONY: clean +clean: + @rm -fv "$(output_dir)"/* + +.PHONY: cv +cv: | "$(output_dir)" cv-pdf cv-md cv-html + +.PHONY: cv-pdf +cv-pdf: + @jinja2 --strict "$(templates_dir)/pdf.override.tex" "$(root_dir)/profile.yml" > "$(root_dir)/.pdf.override.tex" && \ + jinja2 --strict "$(templates_dir)/cv.md" "$(root_dir)/profile.yml" | pandoc -o "$(output_dir)/$(CV_FILENAME).pdf" \ + --pdf-engine=pdflatex \ + --include-before-body="$(root_dir)/.pdf.override.tex" \ + -V geometry:a4paper \ + -V geometry:margin=1cm \ + -V colorlinks=true \ + -V linkcolor=blue + @rm -f "$(root_dir)/.pdf.override.tex" + +.PHONY: cv-md +cv-md: "$(output_dir)" + @jinja2 --strict "$(templates_dir)/cv.md" "$(root_dir)/profile.yml" > "$(output_dir)/$(CV_FILENAME).md" + +.PHONY: cv-html +cv-html: "$(output_dir)" + @jinja2 --strict "$(templates_dir)/cv.html" "$(root_dir)/profile.yml" > "$(output_dir)/$(CV_FILENAME).html" + diff --git a/README.md b/README.md index 825dac7..4822836 100644 --- a/README.md +++ b/README.md @@ -1 +1,69 @@ -# cv.template \ No newline at end of file +# CV.template + +This repository serves as a template for creating personalized CVs in various formats. By following the instructions +below, you can easily generate your own CV using YAML format for your profile information. Happy CV crafting! ✨ + + +## Getting Started + +To get started, follow these simple steps: + + 1. Follow the [instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) + in the GitHub documentation to create a new repository based on this one. + + 2. Clone the repository you just created to your local machine and navigate to the cloned directory: + + ```bash + git clone https://github.com//cv.template.git + cd cv.template + ``` + + 3. Open the [profile.yml](profile.yml) file and fill in your profile information in YAML format. + You can include details such as your name, contact information, education, work experience, skills, and more. + + 4. Optionally, customize the CV format layouts by modifying the provided templates + in the [templates](templates) directory. + + 5. Once you've filled in your profile information and customized the CV layouts, commit your changes + and push them to the repository: + + ```bash + git add . + git commit -m "Update profile information" + git push origin master + ``` + + +## Automatic CV Generation + +Whenever you push changes to the repository, GitHub Actions automatically generate CVs in various formats +using your profile details and the available templates. A new release will be created only if there are changes +to the profile information or any template layout, with the updated CVs attached for easy access. + +You can customize the name of the generated files by modifying the [ci.yml](.github/workflows/ci.yml) workflow +to set the `CV_FILENAME` variable. For example: + +```yaml +env: + CV_FILENAME: J_Codemaster_CV +``` + +This configuration will generate files with the name `J_Codemaster_CV.md`, `J_Codemaster_CV.pdf`, and so on. + + +## Supported Formats and Templates + +Currently, there are three available formats for generating CVs: Markdown, HTML, and PDF. +The layout templates are provided in [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) file format: + + * **Markdown**: Located at [cv.md](templates/cv.md). + * **HTML**: Located at [cv.html](templates/cv.html). + * **PDF**: Generated from the Markdown template. + +Feel free to customize these templates to your needs. + + +## License + +All the source code in this repository is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details. + diff --git a/profile.yml b/profile.yml new file mode 100644 index 0000000..2ac79f9 --- /dev/null +++ b/profile.yml @@ -0,0 +1,118 @@ +--- +full_name: Johnny Codemaster +summary: > + Enthusiastic and innovative software developer with a knack for turning caffeine into code. + Armed with a wizard's wand (keyboard) and a magical hat (headphones), I've crafted digital + wonders for over a decade. My spells range from web enchantments to mobile charms, all sprinkled + with a dash of humor and a pinch of pixel-perfect precision. Seeking new quests to conquer + and challenges to turn into triumphs. + +contact_details: + Email: johnny@codemaster.me + GitPub: https://gitpub.site/johnnycodemaster + LinkedIO: https://linkedio.site/io/johnnycodemaster + +experience: + - title: Senior Sorcerer + company_name: ByteBlitz Technologies + company_url: https://www.byte-blitz.company/ + dates: 01/2020 - Present + location: Remote, Mystical Valley + bullet_points: + - Led a team of code crusaders in developing next-gen applications and enchanting user experiences. + - Spearheaded the implementation of Agile spellcasting methodologies, resulting in a 30% increase in project efficiency. + - Designed and implemented scalable backend architectures using the latest enchanted frameworks. + used_technologies: + - PyroScript + - CharmSQL + - Mystic Cloud Computing + - title: Lead Enchanter + company_name: Pixel Potions Ltd + company_url: https://www.pixel-potions.company/ + dates: 01/2018 - 12/2019 + location: Hybrid, Enchanted Realm + bullet_points: + - Brewed potions (code) to bring stunning visuals and interactive experiences to life. + - Led the development of a magical mobile app, garnering 1 million downloads in its first month. + - Transformed design mockups into pixel-perfect realities, earning accolades from clients and users alike. + used_technologies: + - SorceryScript + - EnchantedReact + - PotionStyles + - Mystical Firebase + - title: Software Alchemist + company_name: Data Dwarves Inc + company_url: https://www.data-dwarves.company/ + dates: 01/2016 - 12/2017 + location: Remote, Arcane Forest + bullet_points: + - Transmuted data into digital gold, crafting robust backend systems and arcane algorithms. + - Implemented machine learning spells to uncover hidden insights in vast datasets, driving business growth. + - Mentored apprentice alchemists, guiding them in the ways of data sorcery and software alchemy. + used_technologies: + - ElixirCraft + - AlchemyTensor + - Potion Pandas + - title: Frontend Wizard + company_name: Code Kingdoms Corp + company_url: https://www.code-kingdoms.company/ + dates: 01/2013 - 12/2015 + location: Enchanted Kingdom, Code Kingdoms + bullet_points: + - Conjured captivating user interfaces and bewitching user interactions for web and mobile platforms. + - Implemented responsive enchantments, ensuring seamless experiences across devices of all sizes. + - Collaborated with designers to bring their visions to life, adding a touch of magic to every pixel. + used_technologies: + - Go# + - HTML6 + - CSS Charms + - JS Spells + - title: Junior Developer + company_name: BitByte Brigade + company_url: https://www.bitbyte-brigade.company/ + dates: 01/2010 - 12/2012 + location: Remote, Mystic Tower + bullet_points: + - Initiated into the mystical world of software development, honing skills in the dark arts of coding. + - Assisted senior wizards in debugging spells and crafting enchanting features for client projects. + - Learned the ancient languages of HTML, CSS, and JavaScript, laying the foundation for my magical journey. + used_technologies: + - EnigmaML + - Sorcerer's Expressions + - WizardJS + - MageQuery + +education: + - title: Bachelor of Science in Computer Science, Magic University + dates: 2005-2010 + +certificates: + - title: Certificate in Advanced Spellcasting Techniques, Wizard Academy + - title: Certificate in Cloud Sorcery, Cloud Academy + url: https://www.cloud-academy.cert/johnnycodemaster + - title: Certificate in Cybersecurity Enchantment, Cryptic College + url: https://www.cryptic-college.cert/johnnycodemaster + +training: + - title: Training in Potion Crafting for Software Engineers, Enchanted Institute + - title: Training in Agile Spellcasting, Agile Wizards Institute + url: https://www.agile-wizards.training/johnnycodemaster + +skills: [PyroScript, ElixirCraft, HTML6, WizardJS, CharmSQL, Mystic Cloud Computing, AlchemyTensor, MageQuery] + +oss_projects: + - title: "SpellCheck.js: A magical library for error-free incantations in JavaScript" + url: https://www.open-source.oss/johnnycodemaster/spellcheck.js + description: A handy library of regex sorcery for JavaScript magic without mishaps. + - title: "PotentCSS: Brew powerful stylesheets with ease using this CSS preprocessor" + url: https://www.open-source.oss/johnnycodemaster/potent.css + description: A magical potion brewed with ElixirCraft and Enchanted Sass for flawless page prestidigitation. + - title: "EnchantedUI: A collection of bewitching UI components for web enchanters" + url: https://www.open-source.oss/johnnycodemaster/enchanted.ui + +publications: + - title: "The Art of Debugging: Finding the Magic in Mistakes" + url: https://wizards-gazette.pub/art-of-debugging + - title: "Sorcery in Software: Harnessing the Power of Abstractions" + url: https://code-conjurors-journal.pub/sorcery-in-software + diff --git a/templates/cv.html b/templates/cv.html new file mode 100644 index 0000000..447df04 --- /dev/null +++ b/templates/cv.html @@ -0,0 +1,89 @@ +{%- set max_exp_items_to_show = 3 -%} + + + + + {{ full_name }}'s CV + + + +

{{ full_name }}

+ + {% for key, value in contact_details.items() %} + {{- key }}: {{ value }}
+ {% endfor %} + +

Summary

+ {{ summary }} + +

Experience

+ {% for item in experience %} + {%- if loop.index > max_exp_items_to_show %} + {%- if loop.index == max_exp_items_to_show + 1 %} +

Earlier Experience

+ Varios locations + + {% endif %} + {%- else %} +

{{ item.title }}, {{ item.company_name }}

+ {{ item.dates}}, {{ item.location }} + + {{ item.used_technologies|join(", ") }} + {% endif -%} + {% endfor %} + +

Education

+ {% for item in education %} +

{{ item.title }}

+ {{ item.dates}} + {% endfor %} + +

Certifications and Training

+ + +

Skills

+ {{ skills|join(", ") }}. + +

Open Source Projects

+ + +

Publications

+ + + diff --git a/templates/cv.md b/templates/cv.md new file mode 100644 index 0000000..c26f242 --- /dev/null +++ b/templates/cv.md @@ -0,0 +1,74 @@ +{%- set max_exp_items_to_show = 3 -%} + +# {{ full_name }} + +{% for key, value in contact_details.items() %} +{{- key }}: [{{ value }}]({{ value }}){% if not loop.last %} \{% endif %} +{% endfor %} + +## Summary + +{{ summary }} + + +## Experience + +{% for item in experience %} +{%- if loop.index > max_exp_items_to_show %} +{%- if loop.index == max_exp_items_to_show + 1 %} +### Earlier Experience +_Varios locations_ +{% endif %} + * {{ item.title }}, [{{ item.company_name }}]({{ item.company_url }}) _({{ item.dates }})_ +{%- else %} +### {{ item.title }}, [{{ item.company_name }}]({{ item.company_url }}) +_{{ item.dates }}, {{ item.location }}_ +{% for bullet_point in item.bullet_points %} + * {{ bullet_point -}} +{% endfor %} + +_{{ item.used_technologies|join(", ") }}_ +{% endif -%} +{% endfor %} + + +## Education +{% for item in education %} +### {{ item.title }} +_{{ item.dates }}_ +{% endfor %} + +## Certifications and Training +{% for item in certificates %} +{%- if item.url is defined and item.url|length %} + * [{{ item.title }}]({{ item.url }}) +{%- else %} + * {{ item.title }} +{%- endif -%} +{% endfor %} +{%- for item in training -%} +{% if item.url is defined and item.url|length %} + * [{{ item.title }}]({{ item.url }}) +{%- else %} + * {{ item.title }} +{%- endif -%} +{% endfor %} + + +## Skills + +{{ skills|join(", ") }}. + + +## Open Source Projects +{% for item in oss_projects %} + * [{{ item.title }}]({{ item.url }}) + {% if item.description is defined and item.description|length -%}{% if not loop.last %} \{% endif %} + {{ item.description }} + {%- endif %} +{% endfor %} + +## Publications +{% for item in publications %} + * [{{ item.title }}]({{ item.url }}) +{%- endfor %} diff --git a/templates/pdf.override.tex b/templates/pdf.override.tex new file mode 100644 index 0000000..1cf38bb --- /dev/null +++ b/templates/pdf.override.tex @@ -0,0 +1,17 @@ +% Generate reproducible PDFs +% https://github.com/jgm/pandoc/issues/6539 +% https://tex.stackexchange.com/a/313605 +\pdfinfoomitdate=1 +\pdftrailerid{} +\pdfsuppressptexinfo=-1 + +% Suppress page numbers +\pagestyle{empty} + +% PDF Properties +\hypersetup{ + pdftitle={ {{ full_name }}'s CV }, + pdfauthor={ {{ full_name }} }, + pdfsubject={CV}, + pdfkeywords={ {{ skills|join(", ") }} } +}