summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CONTRIBUTING.rst140
-rw-r--r--.github/ISSUE_TEMPLATE.md28
-rw-r--r--NEWS2
-rw-r--r--alot/__init__.py2
-rw-r--r--alot/buffers.py12
l---------[-rw-r--r--]docs/source/api/contributing.rst24
-rw-r--r--docs/source/manpage.rst11
-rw-r--r--docs/source/usage/cli_commands.rst15
-rw-r--r--docs/source/usage/cli_options.rst9
-rw-r--r--docs/source/usage/index.rst21
-rw-r--r--docs/source/usage/signals.rst7
-rw-r--r--docs/source/usage/synopsis.rst37
12 files changed, 237 insertions, 71 deletions
diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst
new file mode 100644
index 00000000..6166eb0d
--- /dev/null
+++ b/.github/CONTRIBUTING.rst
@@ -0,0 +1,140 @@
+Contributing
+============
+
+
+Getting Involved
+----------------
+
+Development is coordinated almost entirely via the projects `github page
+<https://github.com/pazz/alot>`_ especially the `issue tracker
+<https://github.com/pazz/alot/issues>`_. We also have an irc channel on
+freenode: #alot
+
+
+Bugs and Feature Requests
+-------------------------
+
+
+Filing a Bug
+````````````
+
+Use the issue tracker on github to file bugs.
+
+Before filing a bug please be sure that you've checked the following:
+
+* That there is not already a bug filed
+
+ * If there is a bug filed, you can follow that bug
+
+ * Please refrain from adding "me too" comments unless the bug has been quiet
+ for a while
+
+* That you are using the most recent version of alot. If you are using an old
+ version please update to the latest version before filing a bug
+
+Once you've checked the above, please file a bug using the issue template.
+
+
+Requesting a Feature
+````````````````````
+
+Feature requests are also filed via the issue tracker.
+
+Before filing a feature request be sure to check the following:
+
+* That the feature has not already been added to master or in a newer version
+
+* That the feature has not already been requested. There is a feature tag for
+ feature requests in the issue tracker, which is a good place to start.
+
+* That the feature is in scope of the project
+
+ Some examples of features that are not in scope:
+
+ * Contact management, fetching email, sending email, indexing email.
+ Alot relies on external services for all of these features. Integration
+ with a new external service is okay.
+
+* If the feature is requested already, please use the thumbs up emoji to add
+ your support for the feature. Please do not add a "me too" comment.
+
+Once you're sure that the feature isn't implemented or already requested, add a
+request. You will be given a template to fill out, but don't, that template is
+for bugs. Please be as thorough as possible when describing the feature, please
+explain what it does, how it should work, and how you plan to use the feature;
+if applicable.
+
+
+Contributing
+------------
+
+
+Before you Contribute
+`````````````````````
+
+Alot is licensed under the `GNU GPLv3+
+<https://www.gnu.org/licenses/gpl-3.0.en.html>`_, and all code contributions
+will be covered by this license. You will retain your copyright on any code you
+write.
+
+By contributing you have agreed that you have the right to contribute the code
+you have written, that the code you are contributing is owned by you or
+licensed with a compatible license allowing it to be added to alot, and that
+your employer or educational institution either does not or cannot claim the
+copyright on any code you write, or that they have given you a waiver to
+contribute to alot.
+
+
+What to Contribute
+``````````````````
+
+* Bug fixes are always welcome
+
+* Tests for bugs. If you can replicate a bug but don't want to or can't fix it
+ we'll still take a unit test. Please decorate the test as an expected
+ failure if it is failing.
+
+* New features. Please be aware that we won't take every feature proposed,
+ especially those that expand the scope of the project.
+
+* Documentation. Including typos, spelling and grammar, wrong type and
+ parameter annotations, or documentation that has gotten out of sync with the
+ code.
+
+
+Sending a Pull Request
+``````````````````````
+
+The best way to send new code is with a pull request using the github interface.
+
+* Follow :pep:`8`. This means in particular a maximum linewidth of *79* and no
+ trailing white spaces. If in doubt, use an Automatic tool (`[0]
+ <http://www.logilab.org/857>`_, `[1] <http://pypi.python.org/pypi/pep8/>`_,
+ `[2] <http://pypi.python.org/pypi/pyflakes/>`_) to verify your code.
+
+* Document! Needless to say, we want readable and well documented code. Moreover,
+
+ * use `sphinx directives
+ <http://sphinx.pocoo.org/domains.html#info-field-lists>`_ to document the
+ parameters and return values of your methods so that we maintain up-to-date
+ API docs.
+ * If you implemented a new feature, update the user manual in
+ `/docs/source/usage` accordingly.
+ * If you implement a new feature or fix a major bug, add it to the NEWS file
+
+* If you close an issue, but sure to use a `"fixes" tag
+ <https://help.github.com/articles/closing-issues-using-keywords/>`_ to
+ automatically close the issue.
+
+* Alot is currently python 2.7 only, but transitioning to python 3.x, please
+ do not use constructs that do not map to python 3
+
+* Make sure you don't regress any unit tests. They are implemented with the
+ builtin unittest module, and can be run with `python setup.py test`, or with
+ your favorite test runner such as pytest or nose.
+
+* If you are fixing a bug or adding a new features, please include unit tests.
+
+* Your patch will be automatically checked in our CI system, which will build
+ docs and run unit tests. If any of these fail merging will be blocked until
+ they are fixed.
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 00000000..b1eaa147
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,28 @@
+Please ensure that the following information is filled before filing
+--------------------------------------------------------------------
+
+Please try to verify that the issue exists in the latest release or, even
+better, the current master.
+
+Please run alot again with the options `-d debug -l log`.
+
+Software Versions
+-----------------
+
+Python version:
+
+Alot version (either a number or sha for master):
+
+Observed behavior
+-----------------
+
+Please include any tracebacks or error information in the log file that you
+generated, as well as a description of the behavior. Please don't post the
+whole log file blindly as it might contain sensitive information and might be
+quite big. A traceback and ~10 lines before and after is probably sufficient.
+
+
+Expected behavior
+-----------------
+
+Please explain what behavior you expect to see.
diff --git a/NEWS b/NEWS
index bcfecaca..e590d573 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-next:
+0.6:
* feature: Add command to reload configuration files in running session
* feature: new command "tag" (and friends) in EnvelopeBuffer to add additional tags after sending
* feature: Themes can now be loaded from system locations
diff --git a/alot/__init__.py b/alot/__init__.py
index 83966213..733006c6 100644
--- a/alot/__init__.py
+++ b/alot/__init__.py
@@ -1,5 +1,5 @@
__productname__ = 'alot'
-__version__ = '0.6.0dev'
+__version__ = '0.7.0dev'
__copyright__ = "Copyright (C) 2012-17 Patrick Totzke"
__author__ = "Patrick Totzke"
__author_email__ = "patricktotzke@gmail.com"
diff --git a/alot/buffers.py b/alot/buffers.py
index 6641bd2e..db122aef 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -167,15 +167,11 @@ class EnvelopeBuffer(Buffer):
description += ', with key '
elif len(encrypt_keys) > 1:
description += ', with keys '
- first_key = True
+ key_ids = []
for key in encrypt_keys:
- if key is not None:
- if first_key:
- first_key = False
- else:
- description += ', '
- if len(key.subkeys) > 0:
- description += key.uids[0].uid
+ if key is not None and key.subkeys:
+ key_ids.append(key.uids[0].uid)
+ description += ', '.join(key_ids)
lines.append(('GPG encrypt', description))
if self.envelope.tags:
diff --git a/docs/source/api/contributing.rst b/docs/source/api/contributing.rst
index a288a7f8..c3474c07 100644..120000
--- a/docs/source/api/contributing.rst
+++ b/docs/source/api/contributing.rst
@@ -1,23 +1 @@
-Contributing
-============
-
-Development is coordinated entirely via the projects `github page <https://github.com/pazz/alot>`_
-especially the `issue tracker <https://github.com/pazz/alot/issues>`_.
-
-You can send patches to notmuch's mailing list but pull requests on github are preferred.
-Here are a few more things you should know and check before you send pull requests:
-
-* Follow :pep:`8`. This means in particular a maximum linewidth of *79* and no trailing
- white spaces. If in doubt, use an Automatic tool
- (`[0] <http://www.logilab.org/857>`_, `[1] <http://pypi.python.org/pypi/pep8/>`_, `[2]
- <http://pypi.python.org/pypi/pyflakes/>`_)
- to verify your code.
-
-* Document! Needless to say, we want readable and well documented code. Moreover,
-
- * use `sphinx directives <http://sphinx.pocoo.org/domains.html#info-field-lists>`_ to document
- the parameters and return values of your methods so that we maintain up-to-date API docs.
- * Make sure your patch doesn't break the API docs. The build service at `readthedocs.org <http://alot.rtfd.org>`_
- is fragile when it comes to new import statements in our code.
- * If you implemented a new feature, update the user manual in :file:`/docs/user` accordingly.
-
+../../../.github/CONTRIBUTING.rst \ No newline at end of file
diff --git a/docs/source/manpage.rst b/docs/source/manpage.rst
index 0e53d82b..58161c87 100644
--- a/docs/source/manpage.rst
+++ b/docs/source/manpage.rst
@@ -11,10 +11,21 @@ Description
.. include:: description.rst
+Options
+-------
+.. include:: usage/cli_options.rst
+
+Commands
+--------
+.. include:: usage/cli_commands.rst
+
Usage
-----
.. include:: usage/first_steps.rst
+UNIX Signals
+------------
+.. include:: usage/signals.rst
See Also
--------
diff --git a/docs/source/usage/cli_commands.rst b/docs/source/usage/cli_commands.rst
new file mode 100644
index 00000000..b1b4b369
--- /dev/null
+++ b/docs/source/usage/cli_commands.rst
@@ -0,0 +1,15 @@
+search
+ start in a search buffer using the querystring provided as
+ parameter. See also :manpage:`notmuch-search-terms(7)`.
+
+compose
+ compose a new message
+
+bufferlist
+ start with only a bufferlist buffer open
+
+taglist
+ start with only a taglist buffer open
+
+pyshell
+ start the interactive python shell inside alot
diff --git a/docs/source/usage/cli_options.rst b/docs/source/usage/cli_options.rst
new file mode 100644
index 00000000..25f324ee
--- /dev/null
+++ b/docs/source/usage/cli_options.rst
@@ -0,0 +1,9 @@
+-r, --read-only open db in read only mode
+-c, --config=FILENAME config file (default: ~/.config/alot/config)
+-n, --notmuch-config=FILENAME notmuch config (default: $NOTMUCH_CONFIG or ~/.notmuch-config)
+-C, --colour-mode=COLOUR terminal colour mode (default: 256). Must be 1, 16 or 256
+-p, --mailindex-path=PATH path to notmuch index
+-d, --debug-level=LEVEL debug log (default: info). Must be one of debug,info,warning or error
+-l, --logfile=FILENAME logfile (default: /dev/null)
+-v, --version Display version string and exit
+-h, --help Display help and exit
diff --git a/docs/source/usage/index.rst b/docs/source/usage/index.rst
index ad207e4a..8fb96cd2 100644
--- a/docs/source/usage/index.rst
+++ b/docs/source/usage/index.rst
@@ -4,10 +4,27 @@ Usage
Commandline invocation
======================
+.. rubric:: Synopsis
.. include:: synopsis.rst
-First Steps
-===========
+.. rubric:: Options
+.. include:: cli_options.rst
+
+.. rubric:: Commands
+
+alot can be invoked with an optional subcommand from the command line.
+Those have their own parameters (see e.g. `alot search --help`).
+The following commands are available.
+
+.. include:: cli_commands.rst
+
+UNIX Signals
+============
+.. include:: signals.rst
+
+
+First Steps in the UI
+=====================
.. _usage.first_steps:
.. include:: first_steps.rst
diff --git a/docs/source/usage/signals.rst b/docs/source/usage/signals.rst
new file mode 100644
index 00000000..c1dcbc9e
--- /dev/null
+++ b/docs/source/usage/signals.rst
@@ -0,0 +1,7 @@
+.. glossary::
+
+ SIGUSR1
+ Refreshes the current buffer.
+
+ SIGINT
+ Shuts down the user interface.
diff --git a/docs/source/usage/synopsis.rst b/docs/source/usage/synopsis.rst
index b23b6df5..db246bd5 100644
--- a/docs/source/usage/synopsis.rst
+++ b/docs/source/usage/synopsis.rst
@@ -1,36 +1 @@
-.. code-block:: none
-
- alot [-r] [-c CONFIGFILE] [-n NOTMUCHCONFIGFILE] [-C {1,16,256}] [-p DB_PATH]
- [-d {debug,info,warning,error}] [-l LOGFILE] [-v] [-h] [command]
-
-Options
-
- -r, --read-only open db in read only mode
- -c, --config=FILENAME config file (default: ~/.config/alot/config)
- -n, --notmuch-config=FILENAME notmuch config (default: $NOTMUCH_CONFIG or ~/.notmuch-config)
- -C, --colour-mode=COLOUR terminal colour mode (default: 256). Must be 1, 16 or 256
- -p, --mailindex-path=PATH path to notmuch index
- -d, --debug-level=LEVEL debug log (default: info). Must be one of debug,info,warning or error
- -l, --logfile=FILENAME logfile (default: /dev/null)
- -v, --version Display version string and exit
- -h, --help Display help and exit
-
-UNIX Signals
- SIGUSR1
- Refreshes the current buffer.
- SIGINT
- Shuts down the user interface.
-
-
-Subcommands
-
- search
- start in a search buffer using the querystring provided as
- parameter. See also the SEARCH SYNTAX section of notmuch(1)
- and the output of `alot search --help`.
- compose
- compose a new message
- See the output of `alot compose --help` for more info on parameters.
- pyshell
- start the interactive python shell inside alot
- See the output of `alot pyshell --help` for more info on parameters.
+alot [options ...] [subcommand]