Created
September 17, 2013 19:23
-
-
Save marcjenkins/6599395 to your computer and use it in GitHub Desktop.
Quick and dirty bash script for creating new Kirby blog posts with Alfred.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cd to blog folder | |
cd ~/Sites/plausiblethought/content/blog/ | |
# count files | |
COUNT=$(ls | wc -l) | |
# make folder (e.g. 10-test) | |
mkdir $COUNT-{query} | |
# cd to folder created above | |
cd $COUNT-{query} | |
# get the date | |
DATE=`date "+%a, %d %b %Y %X"` | |
# create post.txt and fill it with blog post structure | |
echo "Title: | |
‐‐‐‐ | |
Date: $DATE | |
‐‐‐‐ | |
Text: | |
" > post.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://plausiblethought.net/creating-new-blog-posts-with-an-alfred-workflow for details.