blob: f35ce241e793ce84c827a24219985e9b5a8dbda5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import yaml
with open("post.yml") as f:
posts = yaml.load(f)
posts = [dict(post) for post in posts]
for post in posts:
post["post"] = post["post"].encode("iso-8859-1").decode("utf8")
post["title"] = post["title"].encode("iso-8859-1").decode("utf8")
|