Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more fixes for building docs #914

Merged
merged 6 commits into from
Dec 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions alot/commands/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def apply(self, ui):
(['command'], {'help': 'python command string to call'})])
class CallCommand(Command):

""" Executes python code """
"""Executes python code"""
repeatable = True

def __init__(self, command, **kwargs):
Expand Down Expand Up @@ -563,10 +563,8 @@ def f(*args):
(['commandname'], {'help': 'command or \'bindings\''})])
class HelpCommand(Command):

"""
display help for a command. Use \'bindings\' to
display all keybings interpreted in current mode.'
"""
"""display help for a command. Use \'bindings\' to display all keybings
interpreted in current mode.'"""
def __init__(self, commandname='', **kwargs):
"""
:param commandname: command to document
Expand Down
3 changes: 1 addition & 2 deletions alot/commands/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ def apply(self, ui):
help="""flip presence of tags on this thread.
A tag is considered present if at least one message contained in this
thread is tagged with it. In that case this command will remove the tag
from every message in the thread.
""")
from every message in the thread.""")
class TagCommand(Command):

"""manipulate message tags"""
Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ $(CONFIG_OPTION_TABLES): ../alot/defaults/alot.rc.spec
clean:
-$(RM) -rf $(BUILDDIR)/*

cleanall: clean
-$(RM) -rf $(CONFIG_OPTION_TABLES) $(COMMAND_OPTION_TABLES)

html: $(CONFIG_OPTION_TABLES) $(COMMAND_OPTION_TABLES)
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
Expand Down
34 changes: 30 additions & 4 deletions docs/source/configuration/accounts_table
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
:default: ,


.. _alias-regexp:

.. describe:: alias_regexp

a regex for catching further aliases (like + extensions).

:type: string
:default: None


.. _sendmail-command:

.. describe:: sendmail_command
Expand Down Expand Up @@ -127,10 +137,26 @@

.. describe:: encrypt_by_default

Outgoing messages will be GPG encrypted by default if this is set to True.

:type: boolean
:default: False
Alot will try to GPG encrypt outgoing messages by default when this
is set to `all` or `trusted`. If set to `all` the message will be
encrypted for all recipients for who a key is available in the key
ring. If set to `trusted` it will be encrypted to all
recipients if a trusted key is available for all recipients (one
where the user id for the key is signed with a trusted signature).

.. note:: If the message will not be encrypted by default you can
still use the :ref:`toggleencrypt
<cmd.envelope.toggleencrypt>`, :ref:`encrypt
<cmd.envelope.encrypt>` and :ref:`unencrypt
<cmd.envelope.unencrypt>` commands to encrypt it.
.. note:: The values `True` and `False` are interpreted as `all` and
`none` respectively. They are kept for backwards
compatibility to give users a change to migrate to the new
option type. They might become deprecated in future
versions.

:type: option, one of ['all', 'none', 'trusted', 'True', 'False', 'true', 'false', 'Yes', 'No', 'yes', 'no', '1', '0']
:default: none


.. _gpg-key:
Expand Down
87 changes: 64 additions & 23 deletions docs/source/configuration/alotrc_table
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
:default: True


.. _auto-replyto-mailinglist:

.. describe:: auto_replyto_mailinglist

Automatically switch to list reply mode if appropriate

:type: boolean
:default: False


.. _bounce-force-address:

.. describe:: bounce_force_address
Expand All @@ -56,16 +66,6 @@
:default: True


.. _auto_replyto_mailinglist:

.. describe:: auto_replyto_mailinglist

Automatically switch to list reply mode if appropriate

:type: boolean
:default: False


.. _bufferclose-focus-offset:

.. describe:: bufferclose_focus_offset
Expand Down Expand Up @@ -192,7 +192,7 @@

.. describe:: editor_spawn

use terminal_cmd to spawn a new terminal for the editor?
use terminal_command to spawn a new terminal for the editor?
equivalent to always providing the `--spawn=yes` parameter to compose/edit commands

:type: boolean
Expand Down Expand Up @@ -238,7 +238,8 @@

.. describe:: flush_retry_timeout

timeout in seconds after a failed attempt to writeout the database is repeated
timeout in seconds after a failed attempt to writeout the database is
repeated. Set to 0 for no retry.

:type: integer
:default: 5
Expand Down Expand Up @@ -340,6 +341,17 @@
:default: ,


.. _msg-summary-hides-threadwide-tags:

.. describe:: msg_summary_hides_threadwide_tags

In a thread buffer, hide from messages summaries tags that are commom to all
messages in that thread.

:type: boolean
:default: True


.. _notify-timeout:

.. describe:: notify_timeout
Expand Down Expand Up @@ -403,6 +415,19 @@
:default: "> "


.. _reply-account-header-priority:

.. describe:: reply_account_header_priority

The list of headers to match to determine sending account for a reply.
Headers are searched in the order in which they are specified here, and the first header
containing a match is used. If multiple accounts match in that header, the one defined
first in the account block is used.

:type: string list
:default: From, To, Cc, Envelope-To, X-Envelope-To, Delivered-To


.. _reply-force-address:

.. describe:: reply_force_address
Expand Down Expand Up @@ -548,6 +573,17 @@
:default: "Me"


.. _thread-authors-order-by:

.. describe:: thread_authors_order_by

When constructing the unique list of thread authors, order by date of
author's first or latest message in thread

:type: option, one of ['first_message', 'latest_message']
:default: first_message


.. _thread-authors-replace-me:

.. describe:: thread_authors_replace_me
Expand All @@ -559,17 +595,6 @@
:default: True


.. _thread-authors-order-by:

.. describe:: thread_authors_order_by

In which order to list authors. By default, list authors in the order they
joined the conversation.

:type: option, one of ['first_message', 'latest_message']
:default: first_message


.. _thread-statusbar:

.. describe:: thread_statusbar
Expand All @@ -588,6 +613,22 @@
:default: [{buffer_no}: thread] {subject}, {input_queue} total messages: {total_messages}


.. _thread-subject:

.. describe:: thread_subject

What should be considered to be "the thread subject".
Valid values are:

* 'notmuch' (the default), will use the thread subject from notmuch, which
depends on the selected sorting method
* 'oldest' will always use the subject of the oldest message in the thread as
the thread subject

:type: option, one of ['oldest', 'notmuch']
:default: notmuch


.. _timestamp-format:

.. describe:: timestamp_format
Expand Down
2 changes: 1 addition & 1 deletion docs/source/generate_commands.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import os
HERE = os.path.dirname(__file__)
sys.path.append(os.path.join(HERE, '..', '..', '..'))
sys.path.insert(0, os.path.join(HERE, '..', '..'))
from alot.commands import *
from alot.commands import COMMANDS
import alot.buffers
Expand Down
5 changes: 3 additions & 2 deletions docs/source/generate_configs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import os
HERE = os.path.dirname(__file__)
sys.path.append(os.path.join(HERE, '..', '..', '..'))
sys.path.insert(0, os.path.join(HERE, '..', '..'))
from alot.commands import COMMANDS
from configobj import ConfigObj
from validate import Validator
Expand Down Expand Up @@ -38,7 +38,8 @@ def rewrite_entries(config, path, specpath, sec=None, sort=False):
comments = [sec.inline_comments[entry]] + sec.comments[entry]
for c in comments:
if c:
description += ' '*4 + re.sub('^\s*#', '', c) + '\n'
description += ' '*4 + re.sub('^\s*#', '', c)
description = description.rstrip(' ') + '\n'
if etype == 'option':
description += '\n :type: option, one of %s\n' % eargs
else:
Expand Down
3 changes: 1 addition & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ Don't have pip installed? Just download and extract, then run::
python setup.py install --user

Make sure :file:`~/.local/bin` is in your :envvar:`PATH`. For system-wide
installation omit the :option:`--user` flag and call with the respective
permissions.
installation omit the `--user` flag and call with the respective permissions.

.. rubric:: generate manual and manpage

Expand Down
4 changes: 4 additions & 0 deletions docs/source/usage/modes/envelope.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The following commands are available in envelope mode
argument
keyid of the key to encrypt with

optional arguments
:---trusted: only add trusted keys.

.. _cmd.envelope.togglesign:

Expand Down Expand Up @@ -129,6 +131,8 @@ The following commands are available in envelope mode
argument
keyid of the key to encrypt with

optional arguments
:---trusted: only add trusted keys.

.. _cmd.envelope.save:

Expand Down
9 changes: 7 additions & 2 deletions docs/source/usage/modes/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ The following commands are available globally

.. describe:: help

display help for a command. Use 'bindings' to
display all keybings interpreted in current mode.'
display help for a command. Use 'bindings' to display all keybings
interpreted in current mode.'

argument
command or 'bindings'
Expand Down Expand Up @@ -116,6 +116,9 @@ The following commands are available globally

compose a new email

argument
None

optional arguments
:---sender: sender.
:---template: path to a template message file.
Expand Down Expand Up @@ -171,4 +174,6 @@ The following commands are available globally

opens taglist buffer

optional arguments
:---tags: tags to display.

6 changes: 3 additions & 3 deletions docs/source/usage/modes/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following commands are available in search mode

.. describe:: untag

remove tags from all messages in the thread
remove tags from all messages in the thread that match the query

argument
comma separated list of tags
Expand All @@ -42,7 +42,7 @@ The following commands are available in search mode

.. describe:: retag

set tags of all messages in the thread
set tags of all messages in the thread that match the current query

argument
comma separated list of tags
Expand All @@ -62,7 +62,7 @@ The following commands are available in search mode

.. describe:: tag

add tags to all messages in the thread
add tags to all messages in the thread that match the current query

argument
comma separated list of tags
Expand Down
1 change: 1 addition & 0 deletions docs/source/usage/modes/thread.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The following commands are available in thread mode
:---add_tags: add 'Tags' header to the message.
:---shell: let the shell interpret the command.
:---notify_stdout: display cmd's stdout as notification.
:---field_key: mailcap field key for decoding (Defaults to: 'copiousoutput').

.. _cmd.thread.editnew:

Expand Down