nixos/config/emacs/.offlineimap.py

162 lines
3.6 KiB
Python

#! /usr/bin/env python
from subprocess import check_output
import re
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def get_user(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
def hydroxide(path):
file = open(path, "r")
pword = file.read()
return pword
class oauth:
def get_client_id(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
def get_client_secret(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
def get_client_token(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
#! /usr/bin/env python
from subprocess import check_output
import re
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def get_user(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
def hydroxide(path):
file = open(path, "r")
pword = file.read()
return pword
class oauth:
def get_client_id(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
def get_client_secret(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
def get_client_token(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
#! /usr/bin/env python
from subprocess import check_output
import re
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def get_user(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
def hydroxide(path):
file = open(path, "r")
pword = file.read()
return pword
class oauth:
def get_client_id(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
def get_client_secret(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
def get_client_token(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)
#! /usr/bin/env python
from subprocess import check_output
import re
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def get_user(account):
usercmd = check_output("pass " + account, shell=True)
return re.search(rb"login: (.*)", usercmd, flags=0).group(1)
def hydroxide(path):
file = open(path, "r")
pword = file.read()
return pword
class oauth:
def get_client_id(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_id: (.*)", cmd, flags=0).group(1)
def get_client_secret(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1)
def get_client_token(account):
cmd = check_output("pass " + account, shell=True)
return re.search(rb"client_token: (.*)", cmd, flags=0).group(1)