summaryrefslogtreecommitdiff
path: root/alot/utils
Commit message (Collapse)AuthorAge
* main: allow -c to be used multiple timesAnton Khirnov2023-03-16
| | | | Merge values from multiple files.
* argparse: simplify ValidatedStoreAction.__init__Anton Khirnov2023-03-16
|
* helper: move guess_mimetype into its own fileAnton Khirnov2021-11-24
|
* commands/thread: auto-page copiousoutput mailcap handlersAnton Khirnov2021-11-20
|
* utils/mailcap: fix filename handlingAnton Khirnov2021-11-20
| | | | | It is only relevant for the sanitize_attachment_filename hook, so never got triggered.
* commands/envelope: refactor deriving headers to be editedAnton Khirnov2021-11-20
| | | | | | | | | Split the code into its own function. Make it properly case-insensitive. Apply either the blacklist or the whitelist setting, trying to apply both makes no sense. Enforce that either a blacklist or a whitelist is configured in the settings.
* utils/cached_property: replace with the stdlib implementationAnton Khirnov2021-05-13
|
* 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.
* Add code for parsing ANSI escape codes into Urwid AttrSpec.Anton Khirnov2021-01-16
| | | | Based on code by Patrick Totzke <patricktotzke@gmail.com>.
* commands/envelope: keep editable headers orderpacien2019-11-23
| | | | | | | | | | | Use the ordered set of header keys from the settings or from the current envelope when generating an editable envelope. Fixes https://github.com/pazz/alot/issues/898: Message header ordering isn't preserved from the editor Note: collections.OrderedDict has been used for backward compatibility with Python <3.7.
* remove old new-style classes syntaxPatrick Totzke2019-05-27
| | | | | | Python3 only supports "new-style" classes (those extending object), and we don't need to explicitly inherit from this root class any more. See http://pylint-messages.wikidot.com/messages:c1001
* ~ expansion for .config/alot/configbrady2019-01-06
| | | | | | | | pep8! Better variable names, new feature into docs. Make sphinx documentation.
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* py3k: remove basestring and unicode.Dylan Baker2018-03-01
| | | | This probably isn't completely right, but it's a start.
* py3k: use urllib.parse instead of urlparseDylan Baker2018-03-01
| | | | This module moved.
* sanitize parameter for thread mode command 'indent'Patrick Totzke2017-11-05
| | | | | | this introduces a new argparse validation check that makes sure a parameter is '+', '-', or an integer, and uses this check for the 'indent' thread mode command.
* Merge branch 'master' into fix/spellingPatrick Totzke2017-09-02
|\
| * pep8 fixesPatrick Totzke2017-09-01
| | | | | | | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
* | Fix some spelling mistakesLucas Hoffmann2017-09-02
|/
* Replace Exception.message with str(Exception)Dylan Baker2017-08-19
| | | | | | In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
* convert from pygpgme to the python "gpg" moduleDaniel Kahn Gillmor2017-08-14
| | | | | | | | | | | | | | | This converts from the now abandoned pygpgme project for wrapping gpgme, to the upstream gpgme python bindings (which are descended from the pyme project, before they became official). Largely this change should not be user visible, but there are a couple cases where the new bindings provide slightly more detailed error messages, and alot directly presents those messages to users. This patch has been significantly revised and updated by Dylan Baker, but was originally authored by Daniel Kahn Gillmor. Fixes #1069
* add BSD 3 point licence to werkzeug-helperPatrick Totzke2017-06-17
|
* conservative lookup of sub-completersPatrick Totzke2017-06-15
| | | | via cached properties
* alot/utils/argparse: Add a new argparse validators infrastructureDylan Baker2017-01-25
| | | | | | | | | | | | | This adds a new argparse.Action class validates input using a new keyword argument that takes a validator function. This will allow us to replace the use the type keyword as a validator, which is both more correct, and frees up the type keyword to do what it's actually meant to do, convert the input from one type to another. It also adds 3 new validator functions that will be enabled in the next commit. One that checks for a required file, one that checks for an optional directory, and one that looks for a required file, fifo, or block special device (/dev/null).
* utils/argparse.py: Various cleanupsDylan Baker2017-01-25
| | | | | Hide internal values from export and add a message to the TypeError raised by the if the argument isn't in _TRUISH or _FALSISH.
* move alot/settings/checks to alot/utils/configobjDylan Baker2017-01-25
| | | | This is just more reorganization.
* Move utils/booleanaction.py to utils/argparse.pyDylan Baker2017-01-25
| | | | | This module is going to be enhanced with additional components in later patches in this series, so it needs a more generic name.
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* cleanup: pep8/pyflakes fixesPatrick Totzke2012-09-09
|
* fix BooleanActionPatrick Totzke2012-06-16
| | | | | | apparently the __call__ method got lost on the way. Moreover the choices list must match the target type, so is useless here
* cleanup docstring for BooleanActionPatrick Totzke2012-06-14
|
* add copyright statements to all source filesPatrick Totzke2012-06-14
| | | | cf issue #472
* use metavar 'BOOL' for BooleanAction parametersPatrick Totzke2012-06-11
|
* add BooleanAction for argparsePatrick Totzke2012-06-11
This action allows to set a boolean flag via --foo=BAR, where BAR is y/n,true/false etc.