diff options
| author | tslil <tslil@posteo.de> | 2026-04-05 09:42:24 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-04-05 09:44:16 +0100 |
| commit | c495598bdcf38aa7fd2edc2903a42e70ad879ca9 (patch) | |
| tree | cc0da9c0a8825ac33722a530adcdff34c88c208e /oi.py | |
| parent | f68490ef97b0393f6eef2916fe15abe2540be610 (diff) | |
cleanup
Diffstat (limited to 'oi.py')
| -rwxr-xr-x | oi.py | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -1,36 +0,0 @@ -#!/usr/bin/env python2 - -# Support offlineimap by retrieving login credentials and doing nametrans - -import re, os -from subprocess import check_output - -def get_pass_pass(account): - return check_output("pass " + account, shell=True).splitlines()[0] - -def get_authinfo_password(machine, login, port): - s = "machine %s login %s password ([^ ]*) port %s" % (machine, login, port) - p = re.compile(s) - authinfo = os.popen("gpg -q --no-tty -d ~/.authinfo.gpg").read() - return p.search(authinfo).group(1) - -def gmail_remote_to_local(folder): - new = re.sub('^\[Gmail\]/','',folder) - if folder == "INBOX": return folder - elif new == "Sent Mail": return "Sent" - elif new == "All Mail": return "All" - return new - -def gmail_local_to_remote(folder): - new = "[Gmail]/" + folder - if folder == "INBOX": return folder - elif folder in ["Sent", "All"]: return new + " Mail" - return new - -def jhu_remote_to_local(folder): - if folder == "Sent Items": return "Sent" - else: return folder - -def jhu_local_to_remote(folder): - if folder == "Sent": return "Sent Items" - else: return folder |
