unsubscribe from github notifications via script

This commit is contained in:
Felix Van der Jeugt 2021-08-17 10:04:19 +02:00
parent 1311fb6ff4
commit e20322ef12
No known key found for this signature in database
GPG Key ID: 58B209295023754D
1 changed files with 9 additions and 0 deletions

9
local/bin/munsubscribe Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ -z "$*" ]; then
exec munsubscribe .
else
for url in $(mshow -qh list-unsubscribe "$@" | grep -o '<http[^>]*>' | sed -e 's/^<//' -e 's/>$//'); do
curl -w '%{http_code}' -s -o /dev/null "$url"
done
fi