diff options
| author | Adam Olech <nddr89@gmail.com> | 2021-10-27 23:42:12 +0200 |
|---|---|---|
| committer | Adam Olech <nddr89@gmail.com> | 2021-10-27 23:42:12 +0200 |
| commit | ea1c3711678006d7c6258a9c05ea85e5fcba29d7 (patch) | |
| tree | ca9d8812e8199f32e13f83fd9524fac73e95ed7d /content/post | |
| parent | 8b4f6b059651f4c4c61eecc9c7ee91c1bd1cd729 (diff) | |
Add make_post.sh
Diffstat (limited to 'content/post')
| -rwxr-xr-x | content/post/make_post.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 |
