Skip to content

Instantly share code, notes, and snippets.

@williamcroberts
Created April 22, 2020 18:39
Show Gist options
  • Save williamcroberts/15c3b7721a74cf5e0f1e9c733a88e511 to your computer and use it in GitHub Desktop.
Save williamcroberts/15c3b7721a74cf5e0f1e9c733a88e511 to your computer and use it in GitHub Desktop.
Given a properties output yaml file, will dump it into a C array
import yaml
y=yaml.load(open("props.yaml"))
for x in y:
print("{.property=%s, .value=0x%X}," % (x, y[x]['raw']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment