Add entries to caldav servers based on email contents
Project description
Email-assistant reads email messages over IMAP and creates entries on a CalDAV server for events that it finds.
It is designed to operate locally so that you remain in control of your data.
It scans newly received emails to see if they match sources that it knows how to parse, and if so, extracts the schedule information from them and creates events. It will avoid creating duplicate events, even if an email is seen multiple times.
It currently understands emails from the following senders:
United Airlines
Marriott hotels (when booked directly)
Eventbrite
It is simple to add support for more types of emails, and additions are welcome.
Configuration
Create the file ~/.config/email-assistant/config with the following contents:
[mailbox example_mail]
type = IMAP
host = mail.example.com
username = USERNAME
password = PASSWORD
folders = INBOX
[calendar example_cal]
type = caldav
url = https://cloud.example.org/remote.php/dav/
username = USERNAME
password = PASSWORD
calendar = Personal
[pair]
mailbox = example_mail
calendar = example_cal
[general]
geocode = nominatim
Change the username, password, host, and url fields as appropriate, and optionally the folders field if you want to read from a folder other than your INBOX. You can also name the mailbox and calendar sections as you wish. Their names are used in the pair section. Multiple mailboxes, calendars, and pairs are supported.
A pair section must have exactly one mailbox and calendar entry. It tells Email-assistant to read new messages from the specified mailbox and write events to the specified calendar.
In some cases, emails do not contain the timezone information needed to make an ideal calendar event. To add this data, Email-assistant can optionally use the OpenStreetMap Nominatim web service to determine the location of some events and add the appropriate timezone. If you wish to enable this, include the general section above. If you omit it, Email-assistant will simply schedule such events without a timezone. This is used very rarely (currently, only for single-day events from Eventbrite).
Usage
Once the configuration file is in place, run:
email-assistant
It will output information about actions it takes. To get more debug information, run with the -v option. To only output errors (for example, if you want to run it in a cron job) use the -q option.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file email_assistant-0.0.0.tar.gz
.
File metadata
- Download URL: email_assistant-0.0.0.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca15d38fb42538b40719e3372dec214f34a688f128e9e1cb58e5810a530dd8cf |
|
MD5 | be3b5d571225ce803f9e03dfff99514f |
|
BLAKE2b-256 | 1ea34bc601ea8768e366f4d7dbe5589a2dc216f3243a003470a1ba4957b31859 |
File details
Details for the file email_assistant-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: email_assistant-0.0.0-py3-none-any.whl
- Upload date:
- Size: 71.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62bb57883e7b8a06180bd9600a8d088646afa3bacf582873c97ef0fb7b7bd282 |
|
MD5 | 524ae08298f0f1911b0e6f03653784bf |
|
BLAKE2b-256 | be26ddc01df4af74d28ff5abe2c4962e3622a0295d8815a2ad0ce57328238a85 |