From e20322ef12f63cf99dfe8012e3f53f66d1e9e2d8 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 17 Aug 2021 10:04:19 +0200 Subject: [PATCH] unsubscribe from github notifications via script --- local/bin/munsubscribe | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 local/bin/munsubscribe diff --git a/local/bin/munsubscribe b/local/bin/munsubscribe new file mode 100755 index 0000000..82eeaef --- /dev/null +++ b/local/bin/munsubscribe @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ -z "$*" ]; then + exec munsubscribe . +else + for url in $(mshow -qh list-unsubscribe "$@" | grep -o ']*>' | sed -e 's/^$//'); do + curl -w '%{http_code}' -s -o /dev/null "$url" + done +fi