make it better
This commit is contained in:
parent
2f28e02dff
commit
167ee7ce09
|
@ -110,14 +110,14 @@ for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
for tag in post["tags"]:
|
for tag in post["tags"]:
|
||||||
slugtag = slugify(tag)
|
slugtag = slugify(tag)
|
||||||
if slugtag in tags:
|
if slugtag in tags:
|
||||||
tags[tag]["posts"].append(post)
|
tags[slugtag]["posts"].append(post)
|
||||||
else:
|
else:
|
||||||
tags[tag] = {"name": tag, "posts": [post]}
|
tags[slugtag] = {"name": tag, "posts": [post]}
|
||||||
slugauthor = slugify(post["author"])
|
slugauthor = slugify(post["author"])
|
||||||
if slugauthor in authors:
|
if slugauthor in authors:
|
||||||
authors[post["author"]]["posts"].append(post)
|
authors[slugauthor]["posts"].append(post)
|
||||||
else:
|
else:
|
||||||
authors[post["author"]] = {"name": post["author"], "posts": [post]}
|
authors[slugauthor] = {"name": post["author"], "posts": [post]}
|
||||||
|
|
||||||
# Time to write the GMI file
|
# Time to write the GMI file
|
||||||
with open(gmi_subpath+"/"+gmifile, 'w') as gmi:
|
with open(gmi_subpath+"/"+gmifile, 'w') as gmi:
|
||||||
|
|
Loading…
Reference in New Issue