Update 2025-01-18 09:07 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2025-01-18 09:07:54 +01:00
parent 33471962fb
commit 7a70f07a67
2 changed files with 147 additions and 66 deletions

View File

@@ -8,8 +8,6 @@ cd "$HOME/blog"
# extra options appended to the menu
_extra="---
deploy-test * Test Deployment
deploy-prod * Prod Deployment
maintenance * Maintenance Mode
new * New Post
quit * Quit Main Menu"
@@ -20,7 +18,7 @@ do
# parse csv, build and show list
_selection=$(hugo list all \
| grep -Ev ^path\|_index \
| grep -Ev ^path \
| while read _line
do
# csv fields:
@@ -40,8 +38,9 @@ do
_draft_fmt=$([ "$_draft" == "true" ] && echo "(draft)")
_date="$(echo $_line | cut -d"," -f4)"
_date_fmt=$(date -f "%Y-%m-%dT%H:%M:%S" -j "$_date" +"%Y-%m-%d %H:%M")
_type=$(echo "$_file" | grep -q "_index.md$" && echo "page" || echo "post")
echo "$_file * $_date_fmt | $_title $_draft_fmt"
echo "$_file * $_date_fmt | $_type | $_title $_draft_fmt"
done | (sort -t" " -k 2; echo "$_extra") \
| fzf -e --tac +s --with-nth 2.. \
@@ -132,8 +131,6 @@ _edit_entry() {
case "$_selection" in
new) _new ;;
---) ;;
deploy-test) make update ;;
deploy-prod) make prod ;;
maintenance) make maintenance ;;
quit) _quit=1; echo "Good bye." ;;
*) [ -n "$_selection" ] \