Compare commits

..
4 Commits
Author SHA1 Message Date
mxmehl c75f26b384 add for editing text files 2022-02-16 10:48:03 +01:00
mxmehl 557f89c93e fix shellcheck 2022-02-16 10:46:58 +01:00
mxmehl 1a55dc82f1 update signature 2022-02-16 10:46:46 +01:00
mxmehl a1f570f3d1 ignire pycache 2022-02-16 10:46:32 +01:00
4 changed files with 18 additions and 11 deletions
+10 -8
View File
@@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
start=`date +%s` start=$(date +%s)
CURDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) CURDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TMP=/tmp/status # Local status file that indicates whether offline mode is activated
source "$TMP" # shellcheck source=/dev/null
source "/tmp/status"
# If offline mode, do a quick sync # If offline mode, do a quick sync
# shellcheck disable=SC2154
if [ "$var_conn" == "off" ]; then if [ "$var_conn" == "off" ]; then
echo "[INFO] Offline mode enabled. Do a quick sync" echo "[INFO] Offline mode enabled. Do a quick sync"
offlineimap -q offlineimap -q
@@ -15,7 +17,7 @@ else
offlineimap offlineimap
fi fi
sync=`date +%s` sync=$(date +%s)
# Index new mails which will be tagged with notmuch's new.tags # Index new mails which will be tagged with notmuch's new.tags
echo "[DEBUG] Sync notmuch database with new mails" echo "[DEBUG] Sync notmuch database with new mails"
@@ -27,7 +29,7 @@ notmuch tag +inbox -- path:INBOX/**
# Move selectedly tagged mails to folders if they are only in INBOX # Move selectedly tagged mails to folders if they are only in INBOX
echo "[DEBUG] Move tagged mails in INBOX to folders (move-tag.sh)" echo "[DEBUG] Move tagged mails in INBOX to folders (move-tag.sh)"
bash $CURDIR/scripts/move-tag.sh ${var_conn} bash "$CURDIR"/scripts/move-tag.sh "${var_conn}"
# Index again after mails have been moved # Index again after mails have been moved
echo "[DEBUG] Update notmuch database with possibly moved mails" echo "[DEBUG] Update notmuch database with possibly moved mails"
@@ -48,8 +50,8 @@ notmuch tag +event -- tag:"/event.*/"
# Automatic tagging based on location of mails in folders # Automatic tagging based on location of mails in folders
echo "[DEBUG] Tag mails based on their folder (tag-folder.sh)" echo "[DEBUG] Tag mails based on their folder (tag-folder.sh)"
bash $CURDIR/scripts/tag-folder.sh # generates commands from tag-folder.csv bash "$CURDIR"/scripts/tag-folder.sh # generates commands from tag-folder.csv
bash $CURDIR/scripts/tag-folder-rules.sh # executes generated commands bash "$CURDIR"/scripts/tag-folder-rules.sh # executes generated commands
# Mark mails in certain folders read # Mark mails in certain folders read
echo "[DEBUG] Mark mails in trash folders read" echo "[DEBUG] Mark mails in trash folders read"
@@ -60,5 +62,5 @@ notmuch tag -unread -- path:Trash.ignore-mod/**
echo "[DEBUG] Remove the 'new' tag" echo "[DEBUG] Remove the 'new' tag"
notmuch tag -new -- tag:new notmuch tag -new -- tag:new
end=`date +%s` end=$(date +%s)
echo "[DEBUG] poll.sh exited after $((end-start))s ($((sync-start))s download)" echo "[DEBUG] poll.sh exited after $((end-start))s ($((sync-start))s download)"
+3 -3
View File
@@ -1,5 +1,5 @@
-- --
Max Mehl - Programme Manager - Free Software Foundation Europe Max Mehl - Programme Manager -- Free Software Foundation Europe
Contact and information: https://fsfe.org/about/mehl | @mxmehl Contact and information: https://fsfe.org/about/mehl -- @mxmehl
Become a supporter of software freedom: https://fsfe.org/join The FSFE is a charity that empowers users to control technology
+1
View File
@@ -2,5 +2,6 @@
.offlineimap/Repository-FSFE-local .offlineimap/Repository-FSFE-local
.offlineimap/Repository-FSFE-remote .offlineimap/Repository-FSFE-remote
.offlineimap/pid .offlineimap/pid
__pycache__/
.offlineimap/*.lock .offlineimap/*.lock
archives/ archives/
+4
View File
@@ -0,0 +1,4 @@
" Include all in advanced
source ~/.vim/advanced.vim
source ~/.vim/_spellcheck.vim