Skip to content

First Run

Dans ce tutoriel, nous allons lancer PonyExpress localement pour la première fois.

This tutorial will guide you to run PonyExpress for the first time locally

Install the needed toolss

If you use nix, simply rename _shell.nix en shell.nix and run nix-shell --pure

If not, install :

  • python,
  • poetry
  • typst
  • (optionnal) task - a userfriendly alternative to make (will allow you to use the preconfigured scripts)

Install the libraries

If you have task

Terminal window
task setup

else

Terminal window
git clone git@gitlab.com:multi-coop/pony_express.git
cd pony_express
poetry install

Allow access from the GRIST API

You need an API Key to use the GRIST API. This key is associated to your own account and must not be shared.

You can find it via your grist webapp. User icon => Profile settings => API => API keys

Once copied, add it as an environnment variable,

If you use nix, to you shell.nix file (which will be safely ignored by .gitignore) else run

Terminal window
export GRIST_API_KEY="API KEY disponible via votre compte GRIST"

Run the example

The example retrieve the data from this public table and generate a pdf using the templates/exemple/birthday_template.typ

Terminal window
task serve_exemple

else

Terminal window
poetry run python src/pony_express/exemple.py

The generated PDF can be found in the generated folder

Create your own PDF

See Create your own PDF