Files
brevetcard/README.md
Peter Adam fbd55f841a Update README: document CSV workflow and file list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:15:07 +01:00

140 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Brevet Card PDF Generator
LaTeX-based generator for Audax Randonneurs Deutschland brevet cards with front and back sides for duplex printing.
## Quick Start
```bash
# Build everything and generate both PDFs
make build
# The PDFs will be created as:
# - brevetkarte.pdf (front side with participant info)
# - brevetkarte-rueckseite.pdf (back side with control points)
```
## Prerequisites
- Docker
- Make
## Usage
### Build Both PDFs
```bash
make build
```
This will:
1. Build the Docker image with TeXLive
2. Compile `brevetkarte.tex` to `brevetkarte.pdf` (front side)
3. Compile `brevetkarte-rueckseite.tex` to `brevetkarte-rueckseite.pdf` (back side)
### Build Individual Sides
```bash
# Just build front side
make build-front
# Just build back side
make build-back
# Build both sides (without rebuilding Docker image)
make build-pdf
```
### Personalized Cards from CSV
```bash
# 1. Copy the example CSV and fill in participant data
cp "Export Brevetkarte.csv.example" "Export Brevetkarte.csv"
# Edit "Export Brevetkarte.csv" with your participants
# 2. Generate and build personalized cards
make build-personalized
# Output: brevetkarte-personalized.pdf
```
The CSV file `Export Brevetkarte.csv` is not tracked by git (it may contain personal data). The file `Export Brevetkarte.csv.example` shows the expected format.
### Other Commands
```bash
# Just build the Docker image
make build-image
# Open interactive shell in container
make shell
# Clean generated files (.aux, .log, .pdf)
make clean
# Clean everything including Docker image
make clean-all
# Rebuild from scratch
make rebuild
# Show help
make help
```
## Files
- `brevetkarte.tex` - LaTeX source for the front side (two identical blank cards)
- `brevetkarte-template.tex` - Template for personalized cards (placeholders replaced from CSV)
- `brevetkarte-rueckseite.tex` - LaTeX source for the back side (control points)
- `Export Brevetkarte.csv.example` - Example CSV with participant data format
- `generate_cards.py` - Generates `brevetkarte-personalized.tex` from CSV and template
- `cyclist-logo.png` - Audax Randonneurs logo
- `Dockerfile` - Docker image definition (debian:bookworm-slim + TeX Live packages)
- `Makefile` - Build automation
## Output
### Front Side (brevetkarte.pdf)
Contains two identical brevet cards that can be cut in half. Each card includes:
- Participant information fields (Name, Address, etc.)
- Event details (200km "Auf eine Pommes nach Belgien")
- Randonneur Mondiaux rules
- Homologation section
- Start time: 8:30
### Back Side (brevetkarte-rueckseite.pdf)
Contains control points table (4 columns × 6 rows):
- **Rows 1-3**: Control points for upper card
- Nr. 1: Start (Km 0 - Unisport, Bonn)
- Nr. 2: Km 57 - Nationalpark-Tor, Heimbach
- Nr. 3: Km 100 - Friterie "Au Petit Creux", Waimes
- Nr. 4: Km 165 - Mahlberg
- Nr. 5: Km 205 - Finish (Unisport, Bonn)
- **Rows 4-6**: Control points for lower card (same as above, but Nr. 5: Km 214)
- Empty columns for stamps/signatures
- Control question for verification
## Duplex Printing
The PDFs are designed for duplex (double-sided) printing:
1. Print `brevetkarte.pdf` on one side
2. Print `brevetkarte-rueckseite.pdf` on the reverse side
3. The columns and rows are aligned so that:
- Front side columns match back side columns
- Upper card (rows 1-3) aligns with front side upper card
- Lower card (rows 4-6) aligns with front side lower card
4. Cut the sheet in half horizontally to create two separate brevet cards
## Customization
Edit `brevetkarte.tex` to modify front side:
- Event name, date, and location
- Distance (200km)
- Start time
- Club information
- Brevet number format
Edit `brevetkarte-rueckseite.tex` to modify back side:
- Control point locations
- Control times (von/bis)
- Distances
- Control questions