summaryrefslogtreecommitdiff
path: root/docs/api/source/index.rst
blob: f9e0cf158883662a0553296ba599ae6bdf971d42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
`alot` Developer Manual
***********************

.. module:: alot

Birds eye on alot internals
===========================
The main component is :class:`alot.ui.UI`, which provides methods for user input and notifications,
sets up an :mod:`urwid` :class:`mainloop <urwid.main_loop.TwistedEventLoop>` and widget tree and
maintains the list of active buffers. Moreover, it integrates different "managers" responsible for
core functionalities:

* a :class:`~db.DBManager` to access the email database
* an :class:`~account.AccountManager` to deal with user accounts
* a :class:`~settings.AlotConfigParser` (subclasses :class:`configparser.ConfigParser`) for user settings

Every user action, triggered either by keybindings or as input to the commandprompt, is
given as commandline string that gets :func:`translated <commands.commandfactory>`
to a :class:`~commands.Command` which is then :meth:`applied <ui.UI.apply_command>`.
Different actions are defined as a subclasses of :class:`~commands.Command`, which live
in `alot/commands/MODE.py`, where MODE is the name of the mode (:class:`Buffer` type) they
are used in.

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>`_.
Current HEAD can be found in branch `testing` from `git@github.com:pazz/alot.git`.

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 <http://pypi.python.org/pypi/pep8>`_
  to verify your code.

* don't check in :file:`alot/VERSION`. Our current solution for autogenerated version
  strings will update the content of this file when calling `setup.py` but we need
  this file checked in as fallback for the installation to succeed from tarballs. So::

    git update-index --assume-unchanged alot/VERSION

* Document! Needless to say, we want readable and well documented code. Moreover,

  * Please use `sphinx directives <http://sphinx.pocoo.org/rest.html>`_ 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 please update the user manual in :file:`/docs/user` accordingly.

Contents
========

.. toctree::
   :maxdepth: 1

   database
   interface
   settings
   accounts
   utils
   commands