2024-02-25 17:54:31 +01:00
|
|
|
import json
|
|
|
|
|
2024-02-25 17:58:46 +01:00
|
|
|
TEMPLATE = "- [{name}]({url}) _{license}_ ([view](https://www.programmingfonts.org/#{key}))"
|
2024-02-25 17:54:31 +01:00
|
|
|
|
|
|
|
with open('fonts.json') as user_file:
|
|
|
|
file_contents = user_file.read()
|
|
|
|
|
|
|
|
data = json.loads(file_contents)
|
|
|
|
for key in data:
|
|
|
|
print(TEMPLATE.format(
|
2024-02-25 17:58:46 +01:00
|
|
|
key=key,
|
2024-02-25 17:54:31 +01:00
|
|
|
name=data[key]['name'],
|
|
|
|
url=data[key]['website'],
|
|
|
|
license=data[key].get('license', '')))
|