From c3b77872285c05ed42359434d5c306304b8dfaeb Mon Sep 17 00:00:00 2001 From: 53hornet Date: Wed, 15 Dec 2021 15:13:50 -0500 Subject: feat: add rescue draft and move new to scripts, add links --- new.sh | 22 ---------------------- pages/links.php | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100755 new.sh diff --git a/new.sh b/new.sh deleted file mode 100755 index 0664940..0000000 --- a/new.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -read -rp 'Title: ' title -draft=drafts/$(date +'%Y-%m-%d')-$(printf "$title" | tr -Cs '[:alnum:]' '-' | tr '[:upper:]' '[:lower:]').php - -cat > "$draft" << EOF - - -EOF - -$EDITOR "$draft" - -read -rp 'Publish? [y/N]: ' choice -[ 'y' = "$choice" ] && mv "$draft" posts/ || echo Saved draft. - -read -rp 'Go live? [y/N]: ' choice -[ 'y' = "$choice" ] && git commit && git push origin && git push live || echo Deferred publish. diff --git a/pages/links.php b/pages/links.php index 546b90b..25d2c27 100644 --- a/pages/links.php +++ b/pages/links.php @@ -9,7 +9,7 @@ -- cgit v1.2.3