summaryrefslogtreecommitdiff
path: root/new.sh
diff options
context:
space:
mode:
authordavidovski <david@sendula.com>2021-08-26 04:15:22 +0100
committerdavidovski <david@sendula.com>2021-08-26 04:15:22 +0100
commitdaaf7d4350bafc71f25ecde6d03a24b59ed49c50 (patch)
treed5fb9fe514eb04277eeb25bc000c311fef156bc4 /new.sh
initial commit
Diffstat (limited to 'new.sh')
-rwxr-xr-xnew.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/new.sh b/new.sh
new file mode 100755
index 0000000..9fce8a3
--- /dev/null
+++ b/new.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+EDITOR=nvim
+TEMPFILE=/tmp/blog_entry.md
+
+$EDITOR $TEMPFILE
+
+NAME=src/$(head -1 $TEMPFILE | cut -d" " -f2-).md
+
+cp $TEMPFILE "$NAME"
+rm $TEMPFILE
+
+./sync.sh