Añadidos scripts

This commit is contained in:
drymer 2016-09-11 14:01:39 +02:00
parent e187565c37
commit 6b3e295a2a
2 changed files with 31 additions and 0 deletions

19
mutt/scripts/auto-process.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
MESSAGE=$(notmuch show tag:unread 2> /dev/null)
NEWALIAS=$(echo "$MESSAGE" | grep ^"From: ")
if [[ -n $NEWALIAS ]]
then
while read -r line
do
busqueda="$(abook --datafile ~/.correo_dec/dotfiles/abook --mutt-query $(echo $line | cut -d'<' -f2 | cut -d'>' -f1 | cut -d':' -f2 | sed 's/^ //'))"
# auto add sender to abook
if [[ $busqueda = "Not found" ]]
then
echo $line | abook --datafile ~/.correo_dec/dotfiles/abook --add-email-quiet > /dev/null
fi
done < <(echo "$NEWALIAS")
fi

12
mutt/scripts/filtros.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
i=0
lista=("emacs-orgmode@gnu.org" "list_criptica@inventati.org" "@lists.torproject.org")
tags=("orgmode" "criptica" "tor")
for mail in ${lista[@]}
do
notmuch tag -inbox +${tags[$i]} --output=messages $mail tag:inbox
i=$((i+1))
done