Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

simple-frontmatter

This is a simple, unlicensed, frontmatter parser for Python 2.x.

# post.rst
title: The best post ever
author: John
...

This really is the best post ever
=================================

I assure you.
>>> import simple_frontmatter
>>> with open("post.rst") as f:
...     frontmatter, contents = simple_frontmatter.load(f)
...
>>> frontmatter
{'title': 'The best post ever', 'author': 'John'}
>>> contents
'\nThis really is the best post ever\n=================================\n\nI assure you.\n'

You can include the actual module, but I'd just copy and paste the code in simple_frontmatter.py into your project.

About

Simple, unlicensed, frontmatter parser for Python 2.x.

Resources

License

Releases

No releases published

Packages

No packages published

Languages