Skip to content

A Typst script to automatically generate a beautiful face book for your organization, school...!

License

Notifications You must be signed in to change notification settings

SkytAsul/trombinoscope

Repository files navigation

Trombinoscope / Face Book

This is a Typst/Python/Bash project that makes creation of a face book fast and easy.

It was originally created for the French engineering school INSA Rennes, but can easily be adapted to every school in the world.

Instructions

  1. Place in the /raw directory all the raw image files, following the Department/Year/Group hierarchy. They must be in the format .JPG.
  2. Also place the .xlsx files in the same hierarchy.
  3. Put the wanted background image in the trombinoclean directory, under the name bg_big.jpg.
  4. Launch the /convert-raw.sh script. This will :
    1. Read pictures in /raw that have not already been converted
    2. Convert the green screen to the background image
    3. Detect the faces in those pictures
    4. Crop around those faces, or around a center point if the face detection has failed
    5. Resize the pictures to a much lower size (270 in width and keeping the same ratio, customizable)
    6. Save the edited picture in /data in the .JPG format
    7. Remove all previously existing .csv files in /data
    8. Convert all .xlsx files (Google Sheets export / Excel files) from /raw to .csv ones in /data
    • yes, this step will take a long time and will burn your computer
  5. Put the GroupsData.csv file in /data.
  6. Do typst compile trombi.typ.
  7. Ta-dam!

Image dimensions

  • Images should have the same dimensions as the background image (in 2024, 4000x6000).
  • They can be rotated if and only if the file contains the necessary EXIF attributes to make the scripts understand their orientation (i.e., if you open the file with an image viewer, it is automatically in the right orientation).
  • Images should have the .JPG format (case-sensitive).
  • They are automatically cropped around detected face with customizable percentages. They are also resized to a smaller size (in 2024, 270x303).
  • Those peculiarities can be changed in the replacehsv.py Python script.

About

A Typst script to automatically generate a beautiful face book for your organization, school...!

Topics

Resources

License

Stars

Watchers

Forks