summaryrefslogtreecommitdiff
path: root/.local/bin/send-package
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-25 19:40:58 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-25 19:40:58 +0300
commit1087289fd0cfdd5ada7954c3fa4284228e45cd05 (patch)
treee95ad11ad1c3849de1f0e36a26668e7e766aa340 /.local/bin/send-package
parente3d59bae4051a36f3c95523ca82b980ab8e464b4 (diff)
send-package: Why not?
Diffstat (limited to '.local/bin/send-package')
-rwxr-xr-x.local/bin/send-package10
1 files changed, 10 insertions, 0 deletions
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