Skip to content

Tools for organising the Amsterdam Adventure Race

Notifications You must be signed in to change notification settings

mironleon/aratools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ara-tools

Tools for organizing the Amsterdam Adventure Race. Generates printable landscape A3 ponskaart pdfs via pylatex

See example pdf

Generating ponskaart PDFS

You will need to generate two kinds of csv files:

- 1 kml file describing the etappes, their checkpoints (hints, coordinates, etc.)
- 1 csv file listing the team names

Etappe kml file example

The kml file can be generated by copying the template from https://www.google.com/maps/d/edit?mid=1rVk7N_UBCAuckPvF_jvs1ngJeXb7HZo&usp=sharing and clicking export to KML/KMZ and checking export as KML instead of KMZ. An example KML file can also be found in the repo

image

Every layer represents an etappe. It needs to be formatted as Etappe_<index>_<type> where the index is a digit and the type a string like 'hardlopen' or 'fietsen'.

Every layer needs the following columns in the data table: hint(text), hidden(boolean) and score(number). In principle other columns should not cause errors, but better to avoid them. The data table of a layer can be opened by clicking on the three dots next to the layer name:

image

You can either combine all etappes in a single googly mymaps document, with 1 layer per etappe, and export to a single kml file which can be used to generate all the ponskaarten at once. Alternatively, you can use 1 mymaps document per etappe, as long as the name of the layer with the cps follows the scheme described above. The code will ignore all other layers which do not contain exactly two underscore characters (I know, super safe).

Team names

On team name per row. While the code handles very long team names gracefully, it is recommended to limit the names to a sensible 50 characters or so. Does not have to be a csv file, just 1 name per line. Check the input data if teams put in names with multiple lines!

blabalteam
halloteam
team de gekke konijnen
adventure aces

Installing and running locally

Ubuntu

git clone git@github.com:mironleon/aratools.git
cd aratools
pip install .
sudo apt-get install texlive-pictures texlive-science texlive-latex-extra latexmk

In a python shell, notebook or file

from aratools.parcour import Parcour
from pathlib import Path

INPUT_DATA = Path().home() / 'input_data'
parcour = Parcour(INPUT_DATA / 'test_map.kml', INPUT_DATA / 'teams.csv')
OUTPUT = Path().home() / 'output_pdfs'
OUTPUT.mkdir(exist_ok=True)
parcour.generate_ponskaart_pdfs(OUTPUT)

Windows

No idea, probably WSL https://ubuntu.com/wsl (untested)

Running on binder

The easiest way, start the notebook on binder, upload your csv files in the notebook environment and follow the instructions in the notebook.

Note that it may take several minutes for the notebook to start!

Binder

About

Tools for organising the Amsterdam Adventure Race

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published