From 1087289fd0cfdd5ada7954c3fa4284228e45cd05 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 25 Aug 2023 19:40:58 +0300 Subject: send-package: Why not? --- .local/bin/send-package | 10 ++++++++++ .local/share/send-package/template | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100755 .local/bin/send-package create mode 100644 .local/share/send-package/template diff --git a/.local/bin/send-package b/.local/bin/send-package new file mode 100755 index 0000000..4c6538b --- /dev/null +++ b/.local/bin/send-package @@ -0,0 +1,10 @@ +#!/bin/sh + +# Why not? + +readonly tmpl="${XDG_DATA_HOME:-$HOME/.local/share}/send-package/template" + +sed -En '/^Angel Cakes/,/^Doozies/s/(\t|\s{2,})/\n/gp' ~/doc/tit-names \ + | shuf -n1 \ + | xargs -I{} -- sed -e 's/$REPLACEME/{}/' -e "s/\$TO/$TO/" "$tmpl" + | msmtp -t --read-envelope-from diff --git a/.local/share/send-package/template b/.local/share/send-package/template new file mode 100644 index 0000000..ec7dca8 --- /dev/null +++ b/.local/share/send-package/template @@ -0,0 +1,8 @@ +To: $TO +From: Thomas Voss +Subject: Dear Dearest Girlfriend + +I just wanted to let you know, that I really like your $REPLACEME. + +Most Sincere Regards, +Thomas ‘Student of Biology’ Voss -- cgit v1.2.3