Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*~
__pycache__
build/
learner_certificates.egg-info/
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Certificates for The Carpentries

## Using the python program

There are two ways to build certificates from this repo, one depends on the python package cairosvg which in turn depends on cairo development libraries being installed. To use this method, use `bin/certificates.py` to build certificates.
The python program makes use of the `cairosvg` package and supports reading a csv file containing participants using the `pandas` package. You can either install the python package or run it directly from this repo.

```
python3 -m learner_certificates.certificates -h
```

## Using jinja2 directly

The second, pure python method uses the python packages jinja2, jinja2-cli and svglib to build the certificates.

To build certificates this way, you can run:
```
jinja2 swc-attendance.svg -D name="Firstname Lastname" -D date="Nov. 6, 2017" -D instructor="Some Instructor Name" > lastname_firstname.svg
jinja2 learner_certificates/templates/swc-attendance.svg \
-D name="Firstname Lastname" -D date="Nov. 6, 2017" \
-D instructor="Some Instructor Name" > lastname_firstname.svg
svg2pdf lastname_firstname.svg
```

196 changes: 0 additions & 196 deletions bin/certificates.py

This file was deleted.

22 changes: 0 additions & 22 deletions bin/makecert.sh

This file was deleted.

1 change: 1 addition & 0 deletions learner_certificates/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .__version__ import __version__ # noqa F401
1 change: 1 addition & 0 deletions learner_certificates/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
Loading