This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/resources/device/x.py

9 lines
261 B
Python

import csv
import json
with open('manufacturers.csv', 'w') as o:
writer = csv.writer(o)
with open('manufacturers.json') as i:
for x in json.load(i):
writer.writerow([x['name'], x['url'], x['logo'] if x.get('logo', None) else None])