summaryrefslogtreecommitdiff
path: root/alot/db
Commit message (Collapse)AuthorAge
* db/attachment: move to mail/Anton Khirnov2021-01-30
| | | | It has nothing whatsoever to do with the database.
* db/attachment: simplify the Attachment classAnton Khirnov2021-01-30
| | | | | Make it a plain container around raw data and a few bits of metadata, rather than around a whole MIME part.
* db/envelope: move to a new module "mail"Anton Khirnov2021-01-30
| | | | It has nothing to do with the database.
* db/envelope: switch to the "new" (EmailMessage) python APIAnton Khirnov2021-01-30
| | | | | | | | | | email.mime is a part of the old API, which does not mix well with the new one (i.e. when email.policy.SMTP is used), specifically when non-ASCII headers are used. Additionally, clean the APIs that accept either EmailMessage or a str to only expect EmailMessage. Supporting both just adds confusion and complexity.
* helper: move mimewrap() to the only place where it is calledAnton Khirnov2021-01-26
|
* db/message: use DEVNULL stdin when there is no inputAnton Khirnov2021-01-26
| | | | Avoid the child grabbing our stdin.
* Rewrite mailcap handling.Anton Khirnov2021-01-26
| | | | | | | | | | | Add a class that encapsulates the handler and is responsible for managing the temporary file, if one is needed. Use this class for both rendering inline content and displaying attachments externally. External attachments are now wrapped in an asyncio task that is added to a pool of tasks managed by ui.
* db/manager: fix signature of Database.add()Anton Khirnov2021-01-24
|
* db/message: make sure not to leave temporary files aroundAnton Khirnov2021-01-21
| | | | | Use a contextlib.ExitStack to remove the temporary file used by external handler, even if an exception is raised.
* db/message: split _render_part()Anton Khirnov2021-01-21
| | | | | | | | Rename it to _render_part_external() and make it only handle external rendering. Move the other code - dealing with text parts without an external handler - to _MimeTree.render_str(). This takes into account overridden content types, and also processes text/plain parts if that is configured.
* db/message: pass content-type to _render_part()Anton Khirnov2021-01-21
| | | | | Do not get it from the underlying EmailMessage, since we may override it.
* db/message: implement __str__Anton Khirnov2021-01-21
|
* db/message: guess a better content type for octet-stream partsAnton Khirnov2021-01-21
| | | | Same as what is done for Attachment.
* widgets/thread: generic pygments highlightingAnton Khirnov2021-01-21
|
* db/message: fix email-missing warningAnton Khirnov2021-01-21
|
* buffers: make get_info() asynchronousAnton Khirnov2021-01-20
| | | | | Allows computing message/thread counts asynchronously in a separate thread.
* db/thread: add parentheses for chaining queriesAnton Khirnov2021-01-20
|
* db: make sure to close the read-only database instancesAnton Khirnov2021-01-20
|
* db: make write operations asyncAnton Khirnov2021-01-20
|
* db/manager: drop unused variableAnton Khirnov2021-01-19
|
* helper: move humanize_size to the only place where it is usedAnton Khirnov2021-01-16
|
* helper: rewrite mailto_to_envelope/parse_mailto to Envelope.from_mailtoAnton Khirnov2021-01-16
|
* db/message: export headers per-MIME partAnton Khirnov2021-01-15
|
* db/message: passthrough text parts if there is no handlerAnton Khirnov2021-01-13
|
* db/manager: Drop async methodDylan Baker2021-01-10
| | | | | | | | | | As far as I can tell using a separate process doesn't actually improve performance, it makes it worse. The work that we're passing off to the separate function isn't necessarily work that's well suited to being handed off, there isn't a lot of computation and the objects that need to be passed across the pipe are fairly large (at least when considering a pipe). Converting the function to a generator gives better performance and simplifies the implementation.
* Allow designating certain tags as "property" tags.Anton Khirnov2020-05-24
| | | | | | | | Those are tags like attachment, signed, sent, etc., which are set automatically based on message properties and are typically not changed manually. Such designated tags are not affected by the retag operation.
* Consistently use set/frozenset for tags.Anton Khirnov2020-05-24
|
* Switch to the notmuch2 bindings.Anton Khirnov2020-05-09
| | | | | They are supposed to replace the original notmuch python bindings, providing a safer and more pythonic interface.
* db/manager: change add_message signatureAnton Khirnov2020-05-08
| | | | Remove the unused afterwards callback, make tags mandatory.
* db/manager: drop support for adding/removing queriesAnton Khirnov2020-05-08
| | | | | This is not implemented in notmuch2 and does not really belong in alot. It can be done better through the notmuch utility.
* db/manager: get rid of an unnecessary indentation levelAnton Khirnov2020-05-07
|
* db/message: drop unused importsAnton Khirnov2020-05-05
|
* db/thread: fix documentationAnton Khirnov2020-05-05
| | | | message_list stores Messages themselves, not just their ids.
* db/attachment: remove pointless call to string_decode()Anton Khirnov2020-04-23
| | | | The value is already a string.
* db/message: fix handling undecryptable mailAnton Khirnov2020-04-19
|
* db/message: restructure message body handlingAnton Khirnov2020-04-18
| | | | | | | | | | | | | | | | | Instead of allowing the callers to access the email part directly, introduce a new class for representing the MIME tree structure. All interaction with the message content should now happen through this class (some instances of direct access still remain and will be removed later). Encrypted/signed parts are now also handled through this structure rather than using a fragile hack of attaching the decrypted message to the encrypted one and using fake headers to signal encryption/signatures. Message body rendering is now done by walking through the whole MIME tree and considering all the parts for rendering rather than picking one specific part.
* db/message: stop calling get_email() unnecesarilyAnton Khirnov2020-03-06
|
* commands/thread: avoid accessing the email directly in pipetoAnton Khirnov2020-03-06
| | | | | | This also prevents it from modifying the message as it previously did with add_tags. As a consequence, tags are now added to the beginning of the message rather than at the end of header.
* widgets/thread: improve rendering message sourceAnton Khirnov2020-03-06
| | | | Also, stop accessing the email directly.
* widgets/thread: use the headers object to access message headersAnton Khirnov2020-03-06
| | | | Avoid accessing the email directly.
* Update tests.Anton Khirnov2020-03-05
| | | | Drop some tests for removed functions.
* db/message: reduce unnecessary calls to get_payload()Anton Khirnov2020-03-05
|
* db/message: remove unnecessary get_params()Anton Khirnov2020-03-05
|
* db/utils: move formataddr to helperAnton Khirnov2020-03-05
| | | | | | | It has no relation to database, so helper seems like a better place for it. As there is nothing left in db/utils, it is removed.
* db/utils: move is_subdir_of() to the single place it is used inAnton Khirnov2020-03-05
|
* db/utils: move clear_my_address/ensure_unique_address to their usage placeAnton Khirnov2020-03-05
| | | | | They are only used in a single file, so there is no point in keeping them elsewhere.
* db/utils: move message body extraction code into db/messageAnton Khirnov2020-03-05
| | | | | It is only called from there, so there is no reason to keep it elsewhere.
* db/utils: move message decryption code into db/messageAnton Khirnov2020-03-05
| | | | | It is only called from there, so there is no reason to keep it elsewhere.
* db/utils: drop extract_headers()Anton Khirnov2020-03-04
| | | | | It is used in only one place and does something so extremely simple it does not need to be a special imported function.
* db/utils: drop decode_header()Anton Khirnov2020-03-04
| | | | | | | | It is almost entirely unnecessary - python's email messages decode the headers themselves. Do the "normalization" bit directly in the single place where it is done, though properly there should be more thorough message text sanitization somewhere (most likely in our message wrapper).