diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2018-12-08 22:50:20 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2019-08-15 11:33:04 +0100 |
commit | 7a883108b1bc6d8b59ac5a14ebf6265312135be2 (patch) | |
tree | e49908283d6df61141383c875533095cdb9b9c3e | |
parent | 411b8754aa5b85a1d5480f44d4829b713aa19314 (diff) |
remove field_key parameter from PipetoCommand
I don't think anyone needs anything else but copiousoutput here
-rw-r--r-- | alot/commands/thread.py | 24 | ||||
-rw-r--r-- | docs/source/usage/modes/thread.rst | 1 |
2 files changed, 9 insertions, 16 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 801e798b..60c46b93 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -610,8 +610,6 @@ class ChangeDisplaymodeCommand(Command): 'help': 'let the shell interpret the command'}), (['--notify_stdout'], {'action': 'store_true', 'help': 'display cmd\'s stdout as notification'}), - (['--field_key'], {'help': 'mailcap field key for decoding', - 'default': 'copiousoutput'}), ]) class PipeCommand(Command): @@ -621,8 +619,7 @@ class PipeCommand(Command): def __init__(self, cmd, all=False, separately=False, background=False, shell=False, notify_stdout=False, format='raw', add_tags=False, noop_msg='no command specified', - confirm_msg='', done_msg=None, field_key='copiousoutput', - **kwargs): + confirm_msg='', done_msg=None, **kwargs): """ :param cmd: shellcommand to open :type cmd: str or list of str @@ -632,15 +629,15 @@ class PipeCommand(Command): :type separately: bool :param background: do not suspend the interface :type background: bool - :param notify_stdout: display command\'s stdout as notification message - :type notify_stdout: bool :param shell: let the shell interpret the command :type shell: bool - - 'raw': message content as is, - 'decoded': message content, decoded quoted printable, - 'id': message ids, separated by newlines, - 'filepath': paths to message files on disk + :param notify_stdout: display command\'s stdout as notification message + :type notify_stdout: bool + :param format: what to pipe to the processes stdin. one of: + 'raw': message content as is, + 'decoded': message content, decoded quoted printable, + 'id': message ids, separated by newlines, + 'filepath': paths to message files on disk :type format: str :param add_tags: add 'Tags' header to the message :type add_tags: bool @@ -651,8 +648,6 @@ class PipeCommand(Command): :type confirm_msg: str :param done_msg: notification message to show upon success :type done_msg: str - :param field_key: malcap field key for decoding - :type field_key: str """ Command.__init__(self, **kwargs) if isinstance(cmd, str): @@ -668,7 +663,6 @@ class PipeCommand(Command): self.noop_msg = noop_msg self.confirm_msg = confirm_msg self.done_msg = done_msg - self.field_key = field_key async def apply(self, ui): # abort if command unset @@ -712,7 +706,7 @@ class PipeCommand(Command): pipestrings.append(mail.as_string()) elif self.output_format == 'decoded': headertext = extract_headers(mail) - bodytext = extract_body(mail, field_key=self.field_key) + bodytext = extract_body(mail) msgtext = '%s\n\n%s' % (headertext, bodytext) pipestrings.append(msgtext) diff --git a/docs/source/usage/modes/thread.rst b/docs/source/usage/modes/thread.rst index 2f8ba6e4..58888fd1 100644 --- a/docs/source/usage/modes/thread.rst +++ b/docs/source/usage/modes/thread.rst @@ -78,7 +78,6 @@ 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.print: |