diff options
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..8715aa6 --- /dev/null +++ b/README.rst | |||
@@ -0,0 +1,82 @@ | |||
1 | Email-assistant | ||
2 | =============== | ||
3 | |||
4 | Email-assistant reads email messages over IMAP and creates entries on | ||
5 | a CalDAV server for events that it finds. | ||
6 | |||
7 | It is designed to operate locally so that you remain in control of | ||
8 | your data. | ||
9 | |||
10 | It scans newly received emails to see if they match sources that it | ||
11 | knows how to parse, and if so, extracts the schedule information from | ||
12 | them and creates events. It will avoid creating duplicate events, | ||
13 | even if an email is seen multiple times. | ||
14 | |||
15 | It currently understands emails from the following senders: | ||
16 | |||
17 | * United Airlines | ||
18 | * Marriott hotels (when booked directly) | ||
19 | * Eventbrite | ||
20 | |||
21 | It is simple to add support for more types of emails, and additions | ||
22 | are welcome. | ||
23 | |||
24 | Configuration | ||
25 | ------------- | ||
26 | |||
27 | Create the file ``~/.config/email-assistant/config`` with the | ||
28 | following contents: | ||
29 | |||
30 | .. code-block:: | ||
31 | |||
32 | [mailbox example_mail] | ||
33 | type = IMAP | ||
34 | host = mail.example.com | ||
35 | username = USERNAME | ||
36 | password = PASSWORD | ||
37 | folders = INBOX | ||
38 | |||
39 | [calendar example_cal] | ||
40 | type = caldav | ||
41 | url = https://cloud.example.org/remote.php/dav/ | ||
42 | username = USERNAME | ||
43 | password = PASSWORD | ||
44 | calendar = Personal | ||
45 | |||
46 | [pair] | ||
47 | mailbox = example_mail | ||
48 | calendar = example_cal | ||
49 | |||
50 | [general] | ||
51 | geocode = nominatim | ||
52 | |||
53 | Change the ``username``, ``password``, ``host``, and ``url`` fields as | ||
54 | appropriate, and optionally the ``folders`` field if you want to read | ||
55 | from a folder other than your ``INBOX``. You can also name the | ||
56 | ``mailbox`` and ``calendar`` sections as you wish. Their names are | ||
57 | used in the ``pair`` section. Multiple mailboxes, calendars, and | ||
58 | pairs are supported. | ||
59 | |||
60 | A ``pair`` section must have exactly one ``mailbox`` and ``calendar`` | ||
61 | entry. It tells Email-assistant to read new messages from the | ||
62 | specified mailbox and write events to the specified calendar. | ||
63 | |||
64 | In some cases, emails do not contain the timezone information needed | ||
65 | to make an ideal calendar event. To add this data, Email-assistant | ||
66 | can optionally use the OpenStreetMap Nominatim web service to | ||
67 | determine the location of some events and add the appropriate | ||
68 | timezone. If you wish to enable this, include the ``general`` section | ||
69 | above. If you omit it, Email-assistant will simply schedule such | ||
70 | events without a timezone. This is used very rarely (currently, only | ||
71 | for single-day events from Eventbrite). | ||
72 | |||
73 | Usage | ||
74 | ----- | ||
75 | |||
76 | Once the configuration file is in place, run:: | ||
77 | |||
78 | email-assistant | ||
79 | |||
80 | It will output information about actions it takes. To get more debug | ||
81 | information, run with the ``-v`` option. To only output errors (for | ||
82 | example, if you want to run it in a cron job) use the ``-q`` option. | ||