From ea1c3711678006d7c6258a9c05ea85e5fcba29d7 Mon Sep 17 00:00:00 2001 From: Adam Olech Date: Wed, 27 Oct 2021 23:42:12 +0200 Subject: Add make_post.sh --- content/post/make_post.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 content/post/make_post.sh (limited to 'content/post') diff --git a/content/post/make_post.sh b/content/post/make_post.sh new file mode 100755 index 0000000..d16f766 --- /dev/null +++ b/content/post/make_post.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +post_date=`date +'%Y-%m-%d'` +canonical_title=`echo $1 | awk '{ gsub(" ", "-", $0); print tolower($0) }'` +file_name=${post_date}__${canonical_title}.md + +read -r -d '\0' blog_note << EOM ++++ +author = "Adam Olech" +title = "$1" +date = "$post_date" +description = "$1" +tags = [ + "fill", + "me", +] ++++ + +\0 +EOM + +echo "$blog_note" > $file_name -- cgit v1.2.1