Skip to content

Instantly share code, notes, and snippets.

@gkthiruvathukal
Created May 8, 2021 17:52
Show Gist options
  • Save gkthiruvathukal/cd721d80041665d053ac6350124e137b to your computer and use it in GitHub Desktop.
Save gkthiruvathukal/cd721d80041665d053ac6350124e137b to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# requires PyYAML & python-frontmatter
# pip install PyYAML
# pip install python-frontmatter
import frontmatter
import sys
import yaml
fm = frontmatter.load(sys.stdin)
yaml.dump(fm.metadata, sys.stdout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment