summaryrefslogtreecommitdiff
path: root/new.sh
diff options
context:
space:
mode:
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