Skip to content

Commit

Permalink
Remove unused features
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnapalm committed Nov 28, 2023
1 parent 23dca00 commit 5e9c061
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 265 deletions.
5 changes: 3 additions & 2 deletions scripts/variants_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
variants = variants_pb2.FeatureResponse()
variants.ParseFromString(f.read())

keep = ['zwift_launcher_']

with open("../variants.txt") as f:
vs = json.load(f)['variants']
vs = [d for d in json.load(f)['variants'] if any(d['name'].startswith(s) for s in keep)]

for v in MessageToDict(variants)['variants']:
if 'fields' in v['values']:
v['values']['fields'] = dict(sorted(v['values']['fields'].items()))
vs[:] = [d for d in vs if d.get('name') != v['name']]
vs.append(v)

with open("../variants.txt", "w") as f:
Expand Down
Loading

0 comments on commit 5e9c061

Please sign in to comment.