Skip to content

Commit

Permalink
Merge pull request #1 from rszamszur/r.0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
rszamszur authored Sep 2, 2021
2 parents 10cd795 + c02be15 commit 8b38381
Show file tree
Hide file tree
Showing 46 changed files with 2,444 additions and 136 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_PUBLIC_PATH=/pdf-resume-builder/
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the workflow will run
on:
push:
branches-ignore:
- master

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
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
- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: Install, lint and build project
run: make build
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This is a basic workflow to help you get started with Actions

name: Deploy

# Controls when the workflow will run
on: [pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
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
- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: Install, lint and build project
run: make build

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: Archive dist
path: dist
retention-days: 7

- name: Deploy to GitHub Pages
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: dist
commit_message: "Deploy to GitHubPages"
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

This file documents changes to [pdf-resume-builder](https://github.com/rszamszur/pdf-resume-builder). The release numbering uses [semantic versioning](http://semver.org).

### 0.1.0

- [X] Initial release
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu@sha256:cf31af331f38d1d7158470e095b132acd126a7180a54f263d386da88eb681d93
LABEL maintainer="Radosław Szamszur, [email protected]"

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Warsaw

COPY . /pdf-resume-builder

RUN apt update && \
apt install -y build-essential npm nginx && \
unlink /etc/nginx/sites-enabled/default && \
cp /pdf-resume-builder/image/pdf-resume-builder.conf /etc/nginx/conf.d/ && \
apt purge -y --auto-remove && \
cd /pdf-resume-builder && \
npm install && \
npm run build

EXPOSE 80

STOPSIGNAL SIGQUIT

CMD ["nginx", "-g", "daemon off;"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-present Radosław Szamszur

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.
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.DEFAULT_GOAL:=help

.EXPORT_ALL_VARIABLES:

ifndef VERBOSE
.SILENT:
endif

# set default shell
SHELL=/usr/bin/env bash -o pipefail -o errexit
TAG ?= $(shell cat TAG)

REPO_INFO ?= $(shell git config --get remote.origin.url)
COMMIT_SHA ?= git-$(shell git rev-parse --short HEAD)

help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: build
build: ## Build pdf-resume-builder
@build/build.sh

.PHONY: image
image: ## Build pdf-resume-builder image
@build/image.sh

.PHONY: clean-image
clean-image: ## Clean pdf-resume-builder image
@build/clean-image.sh

.PHONY: show-version
show-version:
echo -n $(TAG)
48 changes: 26 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# pdf-resume-builder

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
![Build](https://github.com/rszamszur/pdf-resume-builder/actions/workflows/build.yml/badge.svg)

This project is a simple, stateless, single-page application for generating PDF resume from JSON data. While there are many great opensource projects which render structured data to an online cv, I couldn't found one that can generate a neat PDF as well. Moreover, probably 99% of hiring forms still require a PDF resume anyways.

For now, there is just one template that can still be a bit buggy. Unfortunately, I don't have the resources to thoroughly test it with each possible configuration, so please feel free to submit an issue if you have some rendering problems. That being said, there are some simple template adjustments (margins, font size, etc.) provided which can overcome some problems.

## Usage

1. Choose JSON from [examples](https://github.com/rszamszur/pdf-resume-builder/tree/master/examples)
2. Fill it with your data
3. Go to [Github Pages](https://rszamszur.github.io/pdf-resume-builder/)
4. Generate your template

Adjust the template or play with items order if you're not entirely happy with the outcome. Last but not least, may the odds be in your favor.

## Future development

Soon I'm planing to add two new templates, as well as some minor improvements and early bugs fixes.

## Contributing

Questions, comments or improvements? Please create an issue on Github. I do my best to include every contribution proposed in any way that I can.

## License

[MIT](https://github.com/rszamszur/pdf-resume-builder/blob/master/LICENSE)
1 change: 1 addition & 0 deletions TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
20 changes: 20 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

if [ -n "$DEBUG" ]; then
set -x
fi

set -o errexit
set -o nounset
set -o pipefail

DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P)

if ! command -v npm &> /dev/null; then
echo "npm is not installed"
exit 1
fi

npm install
npm run lint
npm run build
22 changes: 22 additions & 0 deletions build/clean-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

if [ -n "$DEBUG" ]; then
set -x
fi

set -o errexit
set -o nounset
set -o pipefail

DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P)

if command -v docker &>/dev/null; then
echo "[clean-image] Found docker-engine, begin removing image."
docker rmi -f pdf-resume-builder:"$TAG" || true
elif command -v podman &>/dev/null; then
echo "[clean-image] Found podman container engine, begin removing image."
podman rmi -f pdf-resume-builder:"$TAG" || true
else
echo "[clean-image] Neither docker nor podman container engine found."
exit 1
fi
22 changes: 22 additions & 0 deletions build/image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

if [ -n "$DEBUG" ]; then
set -x
fi

set -o errexit
set -o nounset
set -o pipefail

DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P)

if command -v docker &>/dev/null; then
echo "[image] Found docker-engine, begin building image."
docker build -t pdf-resume-builder:"$TAG" .
elif command -v podman &>/dev/null; then
echo "[image] Found podman container engine, begin building image."
podman build -t pdf-resume-builder:"$TAG" .
else
echo "[image] Neither docker nor podman container engine found."
exit 1
fi
Loading

0 comments on commit 8b38381

Please sign in to comment.