Skip to content

A simple class to map url structured content onto your filesystem (with markdown and yaml)

License

Notifications You must be signed in to change notification settings

dirkakrid/urltomd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URLtoMD

URLtoMD is a simple tool to map url like structured content onto your filesystem. It manages your content with yaml and markdown in plaintext files and directories, so you can easily manage it by hand.

They body will be handled as markdown and metadata will be saved as yaml. Metadata will always come first separated from the markdown body by an empty line.

How does it work?

import urltomd
# create an instance of the mapper that manages
# a directory of your choice
mapper = urltomd.Mapper('.')
# yes, relative directories will work! 

# create new content in the directory
blogpost = mapper.create('urltomd')
blogpost.meta['title'] = 'Today I discoved urltomd'
blogpost.meta['author'] = 'Me'
blogpost.meta['type'] = 'post'
blogpost.body = 'It is a really cool tool to manage content in a human readable way.'
blogpost.save()

# mapper.contents will show you all the contents
# in your directory
mapper.contents

How can I get it?

Just install it via pip!

pip install urltomd

You can then import the relevant classes (only Mapper is necessary) from urltomd:

import urltomd

mapper = urltomd.Mapper('.')

This is too low level for me.

I can totally understand that. I am currently working on flare, which is basically a a highly customizable static file content management system built upon urltomd. Why don't you have a look at it?

About

A simple class to map url structured content onto your filesystem (with markdown and yaml)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%