From c756cf590ab20ae90979b0a71b43f600dfbd1224 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 19 Oct 2023 22:09:54 +0200 Subject: Refactor mbsync stuff --- scripts/p7s/mail/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/p7s/mail/__init__.py (limited to 'scripts/p7s/mail/__init__.py') diff --git a/scripts/p7s/mail/__init__.py b/scripts/p7s/mail/__init__.py new file mode 100644 index 00000000..f5db2d86 --- /dev/null +++ b/scripts/p7s/mail/__init__.py @@ -0,0 +1,14 @@ +import pathlib + +from p7s import bitwarden +from p7s.mail import mbsync + + +def generate_config(): + gmail = bitwarden.get_item("https://bitwarden.pdp7.net", "alex@corcoles.net", "cad137b0-cfd5-4d5c-b167-98a9e792f4cc")["login"] + yahoo = bitwarden.get_item("https://bitwarden.pdp7.net", "alex@corcoles.net", "e24727e7-c0ef-4c97-afd0-8497d547304c")["login"] + (pathlib.Path.home() / (".mbsyncrc")).write_text( + mbsync.mbsync_gmail(gmail["username"], gmail["password"], "~/Mail") + + "\n" + + mbsync.mbsync_yahoo(yahoo["username"], yahoo["password"], "~/Mail") + ) -- cgit v1.2.3