Skip to content

Instantly share code, notes, and snippets.

@CarbonAlabel
Created June 8, 2018 20:33
Show Gist options
  • Save CarbonAlabel/0b6772809f5839205fcc96e682cdfd80 to your computer and use it in GitHub Desktop.
Save CarbonAlabel/0b6772809f5839205fcc96e682cdfd80 to your computer and use it in GitHub Desktop.
import dateutil.parser
lines = []
for line in open("changelog.md").read().split("\n"):
lines.append("# " + str(dateutil.parser.parse(line[1:]).date()) if line and line[0] == "#" else line)
open("changelog.md", "w").write("\n".join(lines))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment