Pelican Blog markdown header generator

Published: Wed 16 January 2013

Here’s a little script I wrote for the blogging system I’m using. It’ll generate headers in Markdown by date and start up VIM so you can get editing right away.

            #!/bin/sh

            #Usage: ./write-post.sh <post title in quotes>

            T=$(date +"%Y-%m-%d %H:%M")
            slug=$(date +"log_%Y-%m-%d_%H-%M")

            echo "Title: $1
            Tags: 
            Date: $T
            Category: log
            Slug: $slug
            Author: 
            Summary:" > $slug.md
            vim $slug.md

Affiliated