|
| 1 | +# Open Cinema Index |
| 2 | + |
| 3 | +*Open Cinema Index (OCI)* is a data ingestion and enrichment pipeline for building a structured, open index of films and related entities. It is designed for research, recommendation engines, and archival purposes. The repository contains scripts to fetch film data from open sources, enrich it with metadata, and prepare it for downstream applications. |
| 4 | + |
| 5 | +It is *not* a recommendation engine, a rating platform, or an editorial system. |
| 6 | +Its sole responsibility is to build a reliable, inspectable index of film knowledge that other systems can depend on. |
| 7 | + |
| 8 | +OCI is designed to treat cinema as it actually exists: messy, disputed, multilingual, and full of partial truths. |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- Fetch films from Wikidata by year and retrieve basic metadata |
| 13 | +- Enrich films with properties such as genre, language, and age ratings |
| 14 | +- Designed for offline processing, production applications consume pre-built datasets |
| 15 | + |
| 16 | +## How OCI Thinks About Films |
| 17 | + |
| 18 | +OCI is built around a few guiding ideas: |
| 19 | + |
| 20 | +- Films are stable entities; facts about them are not |
| 21 | +- Titles, genres, runtimes, and even credits are _claims_, not facts |
| 22 | +- Different sources disagree, and that disagreement is meaningful |
| 23 | + |
| 24 | +Rather than flattening every into a single record, OCI keeps track of: |
| 25 | + |
| 26 | +- who said what |
| 27 | +- when they said it |
| 28 | +- and how confident we are |
| 29 | + |
| 30 | +Ambiguity is preserved, not "cleaned up". |
| 31 | + |
| 32 | +## The Ingestion Pipeline |
| 33 | + |
| 34 | +OCI is structured as a pipeline of explicit, repeatable steps: |
| 35 | + |
| 36 | +```text |
| 37 | +fetch -> normalize -> resolve -> enrich -> export |
| 38 | +``` |
| 39 | + |
| 40 | +Each step has a narrow responsibility. |
| 41 | + |
| 42 | +### Fetch |
| 43 | + |
| 44 | +Retrieves raw data from a source without interpretation or transformation. |
| 45 | + |
| 46 | +### Normalize |
| 47 | + |
| 48 | +Maps raw data into OCI's canonical schema. |
| 49 | + |
| 50 | +### Resolve |
| 51 | + |
| 52 | +Handles duplicates, identity collisions, and uncertainty between entities. |
| 53 | + |
| 54 | +### Enrich |
| 55 | + |
| 56 | +Adds secondary metadata (genres, assets, keywords, etc.) additively. |
| 57 | + |
| 58 | +### Export |
| 59 | + |
| 60 | +Emits the indexed data in formats suitable for downstream systems. |
| 61 | + |
| 62 | +## Provenance and Confidence |
| 63 | + |
| 64 | +Every piece of data stored by OCI is associated with: |
| 65 | + |
| 66 | +- a source |
| 67 | +- a fetch timestamp |
| 68 | +- an optional confidence level |
| 69 | + |
| 70 | +Conflicting data is expected and preserved. |
| 71 | +"Unknown" and "uncertain" are valid outcomes. |
| 72 | + |
| 73 | +## Why This Exists |
| 74 | + |
| 75 | +Film culture is broader and stranger than most databases allow. |
| 76 | + |
| 77 | +Many existing systems: |
| 78 | + |
| 79 | +- flatten ambiguity |
| 80 | +- privilege a single source |
| 81 | +- erase minority or regional perspectives |
| 82 | + |
| 83 | +OCI exists to preserve the richness of cinema history without pretending it's tidy. |
| 84 | + |
| 85 | +## Project Status |
| 86 | + |
| 87 | +Open Cinema Index is under active development. |
| 88 | + |
| 89 | +The schema and CLI are expected to evolve. |
| 90 | + |
| 91 | +Contributions are welcome, especially those that respect the project's archival philosophy. |
| 92 | + |
| 93 | +## Environment Variables |
| 94 | + |
| 95 | +The project uses environment variables for secrets. Create a `.env` file based on `.env.example` |
| 96 | + |
| 97 | +```text |
| 98 | +WIKIDATA_USER_AGENT=open-cinema-index (your-email@example.com) |
| 99 | +TMDB_API_KEY=your_tmdb_api_key_here |
| 100 | +``` |
| 101 | + |
| 102 | +- `WIKIDATA_USER_AGENT`: Required by Wikidata's API policy. It should identify your tool and provide a way to contact you. |
| 103 | +- `TMDB_API_KEY`: Required for fetching posters and other metadata from TMDb. |
| 104 | + |
0 commit comments