summaryrefslogtreecommitdiff
path: root/bin/observations-enum-to-boolean.py
blob: eae9bd105b76746b56750211cc9ab5dae5cf3663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3

import dfatool.utils
import json
import lzma
import sys


def main():
    infile = sys.argv[1]
    outfile = sys.argv[2]

    with lzma.open(infile, "rt") as f:
        observations = json.load(f)

    dfatool.utils.observations_enum_to_bool(observations)

    with lzma.open(outfile, "wt") as f:
        json.dump(observations, f)


if __name__ == "__main__":
    main()