File: preprocess-excuses.py

package info (click to toggle)
ben 1.14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 672 kB
  • sloc: ml: 4,116; sh: 345; javascript: 78; ansic: 39; makefile: 29; python: 18
file content (16 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

import sys
import yaml
import json

excuses = yaml.safe_load(open(sys.argv[1]))
result = {}

for source in excuses["sources"]:
    result[source["item-name"]] = {
        "verdict": source["migration-policy-verdict"],
        "excuses": source["excuses"]
    }

json.dump(result, sys.stdout)