@ -4,7 +4,8 @@ if [[ -z "$@" ]]; then
exit 1
fi
title = " $@ "
filename = " content/ $( echo $@ | tr ' ' '_' | tr '[:upper:]' '[:lower:]' ) "
clean_title = $( echo $title | tr ' ' '_' | tr '[:upper:]' '[:lower:]' )
filename = " content/ $clean_title "
if [ [ -e $filename .md ] ] ; then
echo " $filename .md already exists "
exit 1
@ -12,7 +13,6 @@ fi
echo " Title: $title " >> $filename .md
echo " Date: $( date -Iminutes) " >> $filename .md
echo "Author: Wxcafé" >> $filename .md
echo "Category: " >> $filename .md
echo " Slug: $filename " >> $filename .md
echo " Slug: $clean_title " >> $filename .md
echo -e '\n' >> $filename .md
vim +7 $filename .md -s <( echo -n A)