This is a collection of Python scripts I wrote to help streamline and automate IT-related tasks for a film festival I have been working with in recent years.
Besides the time-saving aspect of automating a significant amount of menial and repetetive work, a major benefit of solving these tasks in code lies in being able to rely on a single source of truth from which information is retrieved, avoiding otherwise common and potentially harmful mistakes made when manually transfering information from one place to another (especially critical when it comes to showtimes for films and events, mandatory age limits and other information that is displayed in many contexts throughout the festival).
For this particular festival, most data is entered into, manipulated, stored and retrieved from a number of notion-databases in the runup to the event, while the live festival relies on the eventive platform for its public-facing schedule, ticketing system and the streaming of films.
Some of the scripts make use of both platforms' APIs to update and synchronize data between these services, while others fulfil more specialized tasks, such as exporting film texts and images for use in the festival catalog, generating personal schedules for festival guests or creating the necessary files for large batch print jobs.
More detailed information about the individual scripts and their operation can be found in their respective docstrings, as well as in the overview on the bottom of this page.
Since these scripts are custom-written for a particular festival, virtually none of them will be ready to use "out of the box". They do however offer solutions to a somewhat significant number of tasks that most seasoned festival workers will be familiar with. Equipped with some curiousity and basic knowledge of Python, you might find they can serve as a point of departure or inspiration for your own festival-related coding journey.
Should you for whatever reason wish to more or less directly recreate some of the solutions proposed here, the following information about my configuration might save you some frustration:
- working API keys for my notion and eventive account are placed in modules/secrets.py.
- notion database ids and corresponding names are specified in modules/notion.py.
- names and types of properties in notion databases will have to match those used in the scripts or be adjusted accordingly.
- some scripts depend on the existence of template files referenced in the code. In most cases, a blank file of the appropriate format should do to get you started.
- required third-party packages can be obtained using
pip install
: openpyxl, python-docx
The scripts and codebase are seperated into folders as follows, losely following the sequence of required tasks in the runup to the festival outlined below:
Default folders for templates and other prerequisiste files ('files') / files generated by scripts ('exports). These are exluded from repository for privacy reasons.
Contains codebase neccesary for interacting with service APIs (retrieving and manipulating data), API keys and other secrets as well as some utility functions used by various scripts.
Files included: eventive.py ,notion.py, utils.py, secrets.py (excluded from repository)
Contains a small number of files regularly used for testing purposes, such as displaying and storing API response json-data in a reader-friendly format (pretty_print_json.py).
The scripts in this folder are used to import data on submitted and/or selected films into the festival's notion database. ff_to_filmsdb.py takes an excel spreadsheet with film submissions exported from FilmFreeway, while watchlist_to_filmsdb.py moves other selected films from a preliminary database to the final working film database on notion.
ff_img_import.py automatically downloads html files for FilmFreeway film submissions, crawls them for image links and adds these to the respective film's notion database entry.
After all data on films, events, guests and other festival assets has been worked on and finalized in their respective notion database, the scripts in this folder are used to conveniently push it to other platforms and formats.
This includes:
- pushing films to eventive (films_notion_to_eventive.py)
- pushing screening and events to eventive (events_notion_to_eventive.py) and eventive virtual festival (events_notion_to_virtual.py)
- generating correctly named, sequenced and formatted .docx, .xlsx and image files to be used by the designers of the printed catalogue (notion_to_catalogue.py and subscripts)
- pushing information to the festival website/wordpress (notion_to_wordpress.py, currently WIP)
Where appropriate, backlinks to the respective entries on eventive are automatically written to the original database(s).
Scripts used to peform batch updates to all or selected films and events previously pushed to eventive. This can include changes to the entries' visibility, their availability for purchase etc.
Files included: eventive_update_events.py, eventive_update_films.py (not used), eventive_update_virtual.py (not used).
Scripts used to export information from notion databases in various formats, ranging from simple lists and spreadsheets to more complex documents:
- formatted lists of films with selected credits film_list_export.py
- an overview (and count) of hotel rooms needed on specific dates hotel_list.py
- formatted personal event schedules for guests schedule_export.py
- .csv files used for batch printing and image generation in Adobe InDesign (indesign_data_merge_guest_labels.py, indesign_data_merge_pics.py, indesign_data_merge_titleScreens.py, indesign_data_merge_guest_labels.py, indesign_pass_lists.py
- schedules and overview of technical requirements/instructions for technical staff tech_sheets.py)
Simplifying the process of having large numbers of private expenses reimbursed after the festival, reimbursements.py automatically sorts entries from database, converts foreign currencies, saves receipts with appropriate filenames and generates a reimbursement form to be submitted to the accountant.
A loose collection of scripts not easily classified, in development or written to solve smaller ad-hoc tasks.