A Python script designed to make the Pouet.net database more readable and create direct links to a local backup of the files originaly hosted on ftp.scene.org
.
The goal of this project is to parse the Pouet.net database dumps, classify productions (prods) by platform, and map their download links from ftp.scene.org
to a local backup. This (should) allow easier exploration and access to demoscene productions offline.
- The demoscene is an international computer art subculture focused on creating demos — small, self-contained audiovisual programs that showcase technical and artistic skills. These productions often push the limits of hardware capabilities and demonstrate creative coding and design.
- Pouet.net is the central online hub for the demoscene community. It serves as a database of demoscene productions, providing metadata, download links, and community feedback like comments and votes for each production. Pouet itself DOES NOT HOST demoscene productions.
- Scene.org is a non-profit organization dedicated to archiving demoscene content. The
ftp.scene.org
server hosts a vast collection of demos, tools, and resources, making it a cornerstone for preserving the history of the demoscene.
- Fetch Data: Downloads the latest Pouet.net database dump.
- Parse and Classify: Processes the dump, organizing productions by platform and checking for download links.
- Remap Links: Maps download links from
ftp.scene.org
to a local backup location. - Save Results: Saves classified productions into JSON files for easy access.
This document provides an overview of the key functions in the script, focusing on their role in handling Pouet.net data and resolving download links to a local backup of ftp.scene.org
.
- Purpose: Fetches the latest production dump from Pouet.net.
- Details:
- Connects to the Pouet.net API to retrieve metadata about all available database dumps.
- Downloads the most recent dump (a compressed JSON file) and saves it locally for further processing.
- Why ?:
- Pouet.net hosts metadata about demoscene productions. This function ensures you are working with the most up-to-date data.
- Reads the downloaded Pouet.net dump and organizes productions by platform.
- Details:
- Unzips and parses the JSON dump file.
- Iterates through each production, checking if it has a download link.
- If the link is hosted on
ftp.scene.org
, it remaps the URL to point to a local backup directory. - Classifies productions based on their platform (e.g., Amstrad CPC, Amiga AGA).
- Why ?:
- Helps you organize and access productions by platform.
- Resolves links to local files, enabling offline exploration of archived content.
- Saves the classified productions into JSON files, organized by platform.
- Details:
- Creates a
db/
directory if it doesn’t exist. - For each platform, writes its associated productions to a separate JSON file (e.g.,
db/amiga_aga.json
).
- Creates a
- Why ?:
- Provides a structured and easily accessible format for exploring productions offline.
- High-level orchestration function that ties together the data fetching, classification, and saving steps.
- Details:
- Calls
fetch_data()
to download the latest Pouet.net dump. - Passes the dump to
parse_and_classify()
for processing and classification. - Saves the results using
save_platform_data()
.
- Calls
- Why ?:
- Acts as the main workflow for processing Pouet.net data and resolving links.
- Retrieves a list of supported platforms from the Pouet.net API.
- Details:
- Queries Pouet.net for a list of all platforms (e.g., Amiga, SNES).
- Returns the list in alphabetical order for consistency.
- Why ?:
- Dynamically fetches the platform list to ensure compatibility when a new platform is added to Pouet.net (happens every 5 years approximately).
- Base URL for files hosted on
ftp.scene.org
. - Used to identify and remap links to the local backup.
- HTTP mirror of
ftp.scene.org
. Mirrors on scene.org exist to distribute the load across multiple servers, ensuring faster downloads and higher availability of demoscene files for users worldwide. - Also used for link remapping.