summaryrefslogtreecommitdiff
path: root/alot/__main__.py
Commit message (Collapse)AuthorAge
* main: allow -c to be used multiple timesAnton Khirnov2023-03-16
| | | | Merge values from multiple files.
* db/manager: support flexible database locationAnton Khirnov2022-02-05
| | | | | In newer notmuch versions it no longer needs to be stored along with the emails themselves.
* Add time to log format.Anton Khirnov2021-01-20
| | | | Useful for a quick check how long operations took.
* db: make write operations asyncAnton Khirnov2021-01-20
|
* __main__: print the source location in the log formatAnton Khirnov2020-10-21
|
* Go back to Twisted event loopDylan Baker2018-10-04
| | | | | | | | | | Urwid + asyncio has been known to have very high CPU usage for 4 years now, and it hasn't been fixed. That basically makes it impossible to switch event loops. We can still get the asyncio syntax goodness but using the twisted asyncioreactor and then initializing urwid with the Twisted loop which doesn't have this problem. Fixes #1302
* Describe options the same way in help and manualAlexander Shpilkin2018-07-25
| | | | | The descriptions of --help and --version are the same as used in e.g. GNU coreutils (different from the Python default).
* Reword description of options -C and colourmodeAlexander Shpilkin2018-07-25
|
* Avoid abbreviations in documentationAlexander Shpilkin2018-07-25
|
* Fix typo in description of option -dAlexander Shpilkin2018-07-25
|
* expose namedquery command to CLIPatrick Totzke2018-07-24
|
* Respect colour mode set in config fileAlexander Shpilkin2018-07-22
| | | | | | Terminal colour mode can be set both in the config file and on the command line, but a default value for the command-line option overrode whatever was specified in the config file. Fix this.
* lazy reading of config files in SettingsManagerPatrick Totzke2018-06-21
| | | | | | | | | This prevents SettingsManager from reading the config files right when it is isntantiated and instead waits for the main module to call `read_[notmuch]config` with the right path. This should prevent problems with accidentally reading the default config paths despite being told otherwise (via commandline options)
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Rename get_env to get_xdg_env and clarify docstring.Julian Mehne2018-01-23
|
* Fix empty XDG_* environment variables.Julian Mehne2018-01-21
| | | | | | | | | | | | Use fallback, if an enviroment variable is unset *or* empty. Bug: - XDG_CONFIG_HOME='' alot Problem: Does not find the configuration file (among others), because os.environ.get('XDG_CONFIG_HOME', '~/.config') returns '', instead of '~/.config'.
* Give more context if reading of config file fails.Julian Mehne2017-12-06
|
* Fix some spelling mistakesLucas Hoffmann2017-09-02
|
* settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* settings: Add a reload methodDylan Baker2017-07-10
| | | | | | | | | | | This patch does a bit of refactoring to the Settings class for it's setup, and adds a reload method. The refactoring encapsulates the handling of NoneType for the read_*config methods, and reworks the constructor just a bit so that it doesn't rely on calling methods to create instance variables. The end result is slightly cleaner, and will be useful for adding a reload command to alot itself.
* alot/__main__: use the new validators instead of type=argparse.FileTypeDylan Baker2017-01-25
| | | | | | | | | | This replaces the use of type as a validator with the validator keyword. This is both cleaner and allows the type keyword to be used for setting the type (if it ever becomes necessary). It also has the advantage of not opening and closing the file (thus truncating it) or breaking pipes (like a fifo). Fixes #996
* __main__: split parser into a helper functionDylan Baker2017-01-25
| | | | | This simplifies the main function by pulling out the argument parsing and validating into a separate function.
* Merge pull request #984 from lucc/future/absolute-importsLucas Hoffmann2017-01-21
|\ | | | | Use absolute_imports from __future__
| * Use absolute_imports from __future__Lucas Hoffmann2017-01-18
| |
* | Add docstrings to some methods and functions.Lucas Hoffmann2017-01-20
|/
* Release config files after command line parsingLucas Hoffmann2017-01-10
| | | | | This was tested with lsof(8) and the files are not open when alot is up and running.
* Move default notmuch config path to argparse parser setupLucas Hoffmann2017-01-10
| | | | | | | | | This is only possible for the notmuch config file and not for the alot config file as the former is strictly required but the latter is not. If the latter does not exist it will be detected by the argument parser. If the former is not given on the command line the parser will return `None` and we can manually check if the default config file exists and else just skip the alot config file.
* Expose more internal commands on the command lineLucas Hoffmann2017-01-10
|
* Remove unneeded expanduser callsLucas Hoffmann2017-01-10
| | | | Fixes the -n option.
* Document subcommands in help outputLucas Hoffmann2017-01-10
|
* Use the internal parser for initial command line parsingLucas Hoffmann2017-01-10
| | | | | This again sightly changes the help output and also the possible options for the compose subcommand.
* Simplify finding of config fileLucas Hoffmann2017-01-10
| | | | | Especially let the command line parser check if a file given on the command line exists.
* Replace twisted command line parsing with argparseLucas Hoffmann2017-01-10
| | | | | The command line interface is copied as directly as possible. But at least the help output is formatted differently.
* Revert "Fix values to methods in __main__"Dylan Baker2016-12-28
| | | | | | This reverts commit 581ed2987bd456d2894637a30bb5a14a4caa5f9b. Fixes #942
* Use dict's iter methodsDylan Baker2016-12-21
| | | | | | | | This patch replaces a number of uses of dict.items, dict.values, and dict.keys with their iterative siblings. The advantage of using the iterator version is that they don't copy the keys, values, or items, but simply return references. This reduces memory usage and may speed up the these operations a bit.
* Fix values to methods in __main__Dylan Baker2016-12-21
| | | | | several of these don't take a self argument. In one case self is needed, in the others decorating them as static methods fixes the behavior.
* Fix except syntaxLucas Hoffmann2016-12-09
|
* add __main__.pyPatrick Totzke2015-12-17