| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
import configparser |
| 4 |
import sys |
| 5 |
|
| 6 |
with open(sys.argv[2], 'w', encoding='utf-8') as outfile: |
| 7 |
config = configparser.ConfigParser() |
| 8 |
config.read(sys.argv[1]) |
| 9 |
|
| 10 |
for key, val in config["DEFAULT"].items(): |
| 11 |
outfile.write(f"#define {key.upper()} {val}\n") |