From a3e77b130dd9605fd226249e972833d28687dad8 Mon Sep 17 00:00:00 2001 From: davidovski Date: Fri, 21 Jul 2023 11:12:52 +0200 Subject: add build and new scripts --- new.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 new.sh (limited to 'new.sh') diff --git a/new.sh b/new.sh new file mode 100644 index 0000000..2493cff --- /dev/null +++ b/new.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +EDITOR=nvim +TEMPFILE=/tmp/blog_entry.md + +$EDITOR $TEMPFILE + +NAME=site/entries/$(head -1 $TEMPFILE | cut -d" " -f2- | tr " " "-" | tr "[:upper:]" "[:lower:]").html + +cp $TEMPFILE "$NAME" +rm $TEMPFILE + +chmod +x $NAME -- cgit v1.2.1