mirror of
https://git.davidovski.xyz/davidovski.git
synced 2024-08-15 00:43:29 +00:00
14 lines
225 B
Bash
14 lines
225 B
Bash
|
#!/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
|