Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate badges :) #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
60 changes: 54 additions & 6 deletions summit-19/Badges/FOSSASIA-Summit2019-Participant.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions summit-19/Badges/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Badges quick guide

## Preparation

Create CSV files with the names in the following format (mind the empty line at
the end of the file):

```csv
id,name1,name2,name3,name4
1,Jessa Jones,Peter Parker,Ada Lovelace,Rick Sanchez
2,Adriana C. Ocampo Uria,Cecilia Payne-Gaposchkin,Chien-Shiung Wu,Geraldine Seydoux
3,Nicolaus Copernicus,Stephen Hawking,,

```

The first column will determine the file name of the generated PDFs. Since the SVGs
have 4 badges per sheet, there need to be 4 names per row. The seperator *must* be
an actual comma (`,`). You can use any tool to create/edit the CSV files.

## Inkscape extension
1. download http://wiki.colivre.net/pub/Aurium/InkscapeGenerator/ink-generator.tgz
2. extract into your Inkscape config/extensions directory (`~/.config/inkscape/extensions`)
3. restart Inkscape

## Generate badges

Open one of the SVGs and add text fields with placeholders in the form
`%VAR_name1%`, `%VAR_name2%`, `%VAR_name3%`, `%VAR_name4%`, corresponding with
the column names in the CSV files. See the participant badge SVG as an example.

From the menu bar, select *Extensions* -> *Misc* -> *Generator*.

![Generator dialog](generator-dialog.png)

Set *Collect values by* to `column name`, enter the location of the respective
CSV file as the *Data file*, choose your preferred *Exportation format*, and
for the *Output pattern*, enter `$HOME/generator-output/%VAR_id%.pdf` (or adjust
the directory to your liking). Now click *Apply* to generate the files.
Binary file added summit-19/Badges/generator-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.