mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
34 lines
770 B
Plaintext
34 lines
770 B
Plaintext
|
#!/usr/bin/env python3
|
||
|
|
||
|
"""
|
||
|
Generates a more user-readable changelog from changelog.yaml.
|
||
|
"""
|
||
|
|
||
|
import textwrap
|
||
|
import yaml
|
||
|
|
||
|
with open("changelog.yaml", "r") as f:
|
||
|
data = yaml.safe_load(f)
|
||
|
|
||
|
print("twitch-dl changelog")
|
||
|
print("===================")
|
||
|
print()
|
||
|
print("<!-- Do not edit. This file is automatically generated from changelog.yaml.-->")
|
||
|
print()
|
||
|
|
||
|
for version in data.keys():
|
||
|
date = data[version]["date"]
|
||
|
changes = data[version]["changes"]
|
||
|
print(f"**{version} ({date})**")
|
||
|
print()
|
||
|
for c in changes:
|
||
|
lines = textwrap.wrap(c, 78)
|
||
|
initial = True
|
||
|
for line in lines:
|
||
|
if initial:
|
||
|
print("* " + line)
|
||
|
initial = False
|
||
|
else:
|
||
|
print(" " + line)
|
||
|
print()
|