Commit 6a4adaa7 authored by GunChleoc's avatar GunChleoc
Browse files

Convert info.yaml to info.json

parent 1e15dbe7
#!/usr/bin/env python
# encoding: utf-8
import codecs
import json
import os.path
import sys
"""Checks whether all json files will parse"""
base_path = os.path.normpath(os.path.join(os.path.dirname(__file__), os.path.pardir))
print('Validating JSON in: ' + base_path)
# Load all JSON files to check if they are well-formed JSON
# We could add checks simetimes whether mandatory keys exist.
errors = 0
for (dirpath, _, filenames) in os.walk(base_path):
for filename in filenames:
if filename.endswith('.json'):
jsonpath = os.path.join(dirpath, filename)
try:
jsonfile = codecs.open(jsonpath, encoding='utf-8', mode='r')
json.load(jsonfile) # TODO Why does this not work?
except Exception as error:
print("Error in file %s:" % jsonpath)
print(error)
errors = errors + 1
jsonfile.close()
if errors > 0:
print('Found %d error(s).' % errors)
sys.exit(1)
else:
print('Done.')
{
"id": 1,
"original-language": "en",
"supporters": 0,
"published": "2014-05-10",
"pluxmlID": 234,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "1"
serial: 0
published: 2014-05-10
url: https://www.peppercarrot.com/article234/potion-of-flight
original language: en
financial supporters: {}
{
"id": 2,
"original-language": "en",
"supporters": 21,
"published": "2014-07-25",
"pluxmlID": 237,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "2"
serial: 1
published: 2014-07-25
url: https://www.peppercarrot.com/article237/episode-2-rainbow-potions
original language: en
financial supporters:
Patreon: 21
software:
- name: Krita
- name: GNU/Linux
{
"id": 3,
"original-language": "en",
"supporters": 93,
"published": "2014-10-03",
"pluxmlID": 241,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
},
{
"name": "Amireeti",
"contribution":[ "translation & corrections" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "G'MIC",
"version": "TODO"
},
{
"name": "Xubuntu",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "3"
serial: 2
published: 2014-10-03
url: https://www.peppercarrot.com/article241/episode-3-the-secret-ingredients
original language: en
financial supporters:
Patreon: 93
software:
- name: Krita
- name: G'MIC
- name: Xubuntu
- name: GNU/Linux
{
"id": 4,
"original-language": "en",
"supporters": 156,
"published": "2014-11-21",
"pluxmlID": 243,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
},
{
"name": "Amireeti",
"contribution":[ "english corrections" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "G'MIC",
"version": "TODO"
},
{
"name": "Blender",
"version": "TODO"
},
{
"name": "GIMP",
"version": "TODO"
},
{
"name": "Ubuntu GNOME",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "4"
serial: 3
published: 2014-11-21
url: https://www.peppercarrot.com/article243/episode-4-moment-of-genius
original language: en
financial supporters:
Patreon: 156
software:
- name: Krita
- name: G'MIC
- name: Blender
- name: GIMP
- name: Ubuntu GNOME
- name: GNU/Linux
{
"id": 5,
"original-language": "en",
"supporters": 170,
"published": "2014-12-19",
"pluxmlID": 244,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "G'MIC",
"version": "TODO"
},
{
"name": "Blender",
"version": "TODO"
},
{
"name": "Ubuntu GNOME",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "5"
serial: 4
published: 2014-12-19
url: https://www.peppercarrot.com/article244/special-holiday-episode
original language: en
financial supporters:
Patreon: 170
software:
- name: Krita
- name: G'MIC
- name: Blender
- name: Ubuntu GNOME
- name: GNU/Linux
{
"id": 6,
"original-language": "fr",
"supporters": 245,
"published": "2015-03-28",
"pluxmlID": 271,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "Linux Mint",
"version": "TODO"
}
],
"notes":[]
}
---
id: "6"
serial: 5
published: 2015-03-28
url: https://www.peppercarrot.com/article271/episode-6-the-potion-contest
original language: fr
financial supporters:
Patreon: 245
credits:
all:
David Revoy: art & scenario
software:
- name: Krita
- name: Linux Mint
{
"id": 7,
"original-language": "fr",
"supporters": 273,
"published": "2015-04-30",
"pluxmlID": 273,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "Linux Mint",
"version": "TODO"
}
]
}
---
id: "7"
serial: 6
published: 2015-04-30
url: https://www.peppercarrot.com/article273/episode-7-the-wish
original language: fr
financial supporters:
Patreon: 273
credits:
all:
David Revoy: art & scenario
software:
- name: Krita
- name: Linux Mint
{
"id": 8,
"original-language": "fr",
"supporters": 354,
"published": "2015-06-28",
"pluxmlID": 285,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "TODO"
},
{
"name": "Inkscape",
"version": "TODO"
},
{
"name": "Linux Mint",
"version": "TODO"
},
{
"name": "GNU/Linux",
"version": "TODO"
}
],
"notes":[]
}
---
id: "8"
serial: 7
published: 2015-06-28
url: https://www.peppercarrot.com/article285/episode-8-pepper-s-birthday-party
original language: fr
financial supporters:
Patreon: 354
credits:
all:
David Revoy: art & scenario
software:
- name: Krita
- name: Inkscape
- name: Linux Mint
- name: GNU/Linux
{
"id": 9,
"original-language": "fr",
"supporters": 406,
"published": "2015-07-31",
"pluxmlID": 289,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "2.9.6"
},
{
"name": "Inkscape",
"version": "0.91"
},
{
"name": "Linux Mint",
"version": "17"
}
],
"notes":[]
}
---
id: "9"
serial: 8
published: 2015-07-31
url: https://www.peppercarrot.com/article289/episode-9-the-remedy
original language: fr
financial supporters:
Patreon: 406
credits:
all:
David Revoy: art & scenario
software:
- name: Krita
version: "2.9.6"
- name: Inkscape
version: "0.91"
- name: Linux Mint
version: "17"
{
"id": 10,
"original-language": "fr",
"supporters": 422,
"published": "2015-08-29",
"pluxmlID": 298,
"background-color": "#FFFFFF",
"credits":[
{
"name": "David Revoy",
"contribution":[ "art & scenario" ]
}
],
"software":[
{
"name": "Krita",
"version": "2.9.6"
},
{
"name": "Inkscape",
"version": "0.91"
},
{
"name": "Linux Mint",
"version": "17"
}
],
"notes":[]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment