blob: b3cb5855c9d129b2e7404b6cf95efed29e8959d5 [file] [log] [blame]
Ole Troan5c318c72020-05-05 12:23:47 +02001# CRC generation
2import json
3
4#
5# Plugin entry point
6#
7def run(args, input_filename, s):
8 j = {}
9 major = 0
10 if 'version' in s['Option']:
11 v = s['Option']['version']
12 (major, minor, patch) = v.split('.')
13 for t in s['Define']:
14 j[t.name] = {'crc': f'{t.crc:#08x}', 'version': major,
15 'options': t.options}
16 return json.dumps(j, indent=4, separators=(',', ': '))