Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badge Generator

Generate conference badges from a background image and a list of participants.

The script creates a PDF file containing printable badges arranged on A4 pages.

Features

  • Generate multiple badges from a custom background image
  • Read participant names from a tab-separated text file
  • Automatically center first names and last names
  • Wrap long last names over multiple lines
  • Export badges as a printable PDF file

Requirements

The project requires:

  • pandas
  • Pillow
  • reportlab

Installation

Clone the repository:

git clone https://github.com/parisepigenetics/badge_generator.git
cd badge_generator

Create the conda environment:

conda env create -f environment.yml

Activate the environment:

conda activate badges

Alternatively, you can run the script without activating the environment:

conda run -n badges python badges.py --help

Input files

Badge template image

Replace background.png with your own badge background image.

The generated badges use the following dimensions:

  • Width: 86 mm
  • Height: 54 mm

The background image should ideally have the same aspect ratio as the final badge.

Participant list

Replace participants.txt with your participant list.

The file must be a tab-separated text file (TSV) with a header line:

NOM	Prénom
DUPONT	Jean
MARTIN	Alice
DOE	John

Requirements:

  • One participant per line
  • Last name and first name separated by a tab character
  • Keep the header names exactly as shown:
    • NOM
    • Prénom

Usage

Generate a PDF containing all badges:

conda run -n badges python badges.py \
    -p participants.txt \
    -t background.png \
    -o badges.pdf

or:

conda activate badges

python badges.py \
    -p participants.txt \
    -t background.png \
    -o badges.pdf

The output file badges.pdf can then be printed on A4 sheets.

License

GNU General Public License GPL-3.0

About

To generate conference badges from a background picture and a list of names.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages