À l’occasion du 1<sup>er</sup> avril 2017, le vulgarisateur français [e-penser](https://www.youtube.com/user/epenser1) a posté sur YouTube un réseau de vidéos interconnectées à la manière d’un labyrinthe. À chaque vidéo, le vidéaste nous laisse le choix d’en visionner deux autres, et nous met au défi de toutes les regarder pour parvenir à trouver une vidéo mystérieuse.
Some YouTube creators have made video “gamebooks” by creating videos in which viewers can make choices that influence the course of the narration.
This is generally implemented by breaking up the video into short and interlinked segments.
This project aims at automatically exploring those video mazes and creating a visual representation of the underlying network.
Ce dépôt contient le code utilisé pour générer [un graphe de dépendances de chaque vidéo vers celles liées](https://matteo.delab.re/projects/epenser-maze), permettant d’accéder directement à la vidéo mystérieuse.
[See it live →](https://youtube-maze.cloud.delab.re)
## Technologies
## How Does it Work?
* [JavaScript (ES6)](https://fr.wikipedia.org/wiki/JavaScript) : langage de programmation interprété.
* [Node.JS](https://fr.wikipedia.org/wiki/Node.js) : environnement d’exécution de JavaScript.
* [Graphviz](http://www.graphviz.org/) : outil pour visionner et générer des représentations de graphes.
The [algorithm](lib/explore.mjs) starts at the first video and explores the links recursively using a breadth-first search approach, keeping track of the links as it goes.
The [Graphviz](http://www.graphviz.org/) library is used to automatically layout the graph so that as few edges cross as possible.
## Générer le graphe
## Running Locally
Pour générer le graphe par vous-même, vous devez au préalable avoir installé Node.JS et Graphviz. Ensuite, lancez les commandes suivantes dans un terminal :
You can also run the server locally, provided you have a working installation of Node.JS and Graphviz.