WIP: utils: Add generate-json-episodes-v2-list.py
This is the initial implementation of the episodes-v2.json API. The implementation is complete but lacks tests and documentation.
It's different to the previous implementations as it:
- Searches the filesystem for files rather than inferring
- Creates and compares all translations for consistency
- Isolates IO to a surveying system for easier testing
Implements documentation!5 (closed) See #19 (closed) for full discussion
Sample output:
[
{
"directory": "ep01_Orange",
"translations": [
"en",
"fr"
],
"filenames": {
"comic": [
"Pepper-and-Carrot_by-David-Revoy_E01P01.jpg",
"Pepper-and-Carrot_by-David-Revoy_E01P02.jpg",
"Pepper-and-Carrot_by-David-Revoy_E01P03.jpg"
],
"cover": "Pepper-and-Carrot_by-David-Revoy_E01.jpg",
"title": "Pepper-and-Carrot_by-David-Revoy_E01P00.jpg",
"credits": "Pepper-and-Carrot_by-David-Revoy_E01P04.jpg"
}
},
{
"directory": "ep02_The-Blue-long-foldername",
"translations": [
"en",
"fr"
],
"filenames": {
"comic": [
"Pepper-and-Carrot_by-David-Revoy_E02P01.jpg",
"Pepper-and-Carrot_by-David-Revoy_E02P02.jpg",
"Pepper-and-Carrot_by-David-Revoy_E02P03.jpg"
],
"cover": "Pepper-and-Carrot_by-David-Revoy_E02.jpg",
"title": "Pepper-and-Carrot_by-David-Revoy_E02P00.jpg",
"credits": "Pepper-and-Carrot_by-David-Revoy_E02P04.jpg"
}
},
{
"directory": "ep03_The-Green-Shadow",
"translations": [
"en",
"fr"
],
"filenames": {
"comic": [
"Pepper-and-Carrot_by-David-Revoy_E03P01.jpg",
"Pepper-and-Carrot_by-David-Revoy_E03P02.gif",
"Pepper-and-Carrot_by-David-Revoy_E03P03.jpg"
],
"cover": "Pepper-and-Carrot_by-David-Revoy_E03.jpg",
"title": "Pepper-and-Carrot_by-David-Revoy_E03P00.jpg",
"credits": "Pepper-and-Carrot_by-David-Revoy_E03P04.jpg"
}
}
]