diff --git a/README.md b/README.md index 703a4ef..899b841 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,4 @@ Currently, I'm considering the following Capturers (based on my own life): - [ ] [Netflix](design/netflix.md) - [ ] [Deezer](design/deezer.md) - [ ] [Calendar/CalDav](design/caldav.md) +- [ ] [Email](design/email.md) diff --git a/design/email.md b/design/email.md new file mode 100644 index 0000000..57982ed --- /dev/null +++ b/design/email.md @@ -0,0 +1,29 @@ +# Email Capturer + +The Email capturer keeps listening to an IMAP and produces one entry for each +new email. + +This can be used for creating random notes over the day. + +## Configuration + +The Capturer will require: + +- IMAP address +- Username +- Password + +**Note**: We may need to support IMAPS. + +## Internals + +Keep a list of email IDs in the database. Once we reach an ID that is already +there, we stop producing entries. + +## Output + +``` +{{ email.content }} +``` + +Title is the email Subject field. diff --git a/design/store.md b/design/store.md index e4b426c..1d484e1 100644 --- a/design/store.md +++ b/design/store.md @@ -6,8 +6,35 @@ functionality for Viewers. We would probably need a design like: -- id: UUID of the record -- title: String, produced by a Capturer -- content: Text, produced by a Capturer, must always be Markdown (to avoid having a format that needs to be specially processed by some viewer) -- source: Name of the Capturer -- meta: HashMap, with some information the Capturer has about the entry +## Entry + +| Field | Description | +| ------- | --------------------------------------------------- | +| id | UUID of the record. | +| title | String, produced by a Capturer. | +| content | Text, produced by a Capturer. It's always Markdown. | +| source | Capturer name. | + +## Meta + +Meta contains the meta information of the entry, used by a Capturer. A view may +or may not display those fields. + +| Field | Description | +| ------- | --------------------------------------------------- | +| id | UUID of the record. | +| entry | ForeignKey of the entry. | +| name | Meta field name. | +| value | Meta field value. | + +## Attachments + +Attachments are not meta information, but something related to the entry -- for +example, if the content contains any images, those are added as attachments. + +| Field | Description | +| ------------ | --------------------------------------------------- | +| id | UUID of the record. | +| entry | ForeignKey of the entry. | +| content_type | Type of the content. | +| content | Attachment content, in Base64. |