summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs
diff options
context:
space:
mode:
authorBarry Warsaw2013-03-19 17:34:45 -0700
committerBarry Warsaw2013-03-19 17:34:45 -0700
commit39f0557eb67fec37b3cfea848592ed8c50fd4be9 (patch)
treee902dad22cef8e39235564b454ac81eeaeaa4f8a /src/mailman/commands/docs
parentd1e83500b9cbd44eaafc8c1fa59272b8e2946930 (diff)
downloadmailman-39f0557eb67fec37b3cfea848592ed8c50fd4be9.tar.gz
mailman-39f0557eb67fec37b3cfea848592ed8c50fd4be9.tar.zst
mailman-39f0557eb67fec37b3cfea848592ed8c50fd4be9.zip
Diffstat (limited to 'src/mailman/commands/docs')
-rw-r--r--src/mailman/commands/docs/conf.rst68
-rw-r--r--src/mailman/commands/docs/mailmanconf.rst61
2 files changed, 68 insertions, 61 deletions
diff --git a/src/mailman/commands/docs/conf.rst b/src/mailman/commands/docs/conf.rst
new file mode 100644
index 000000000..6e458fb54
--- /dev/null
+++ b/src/mailman/commands/docs/conf.rst
@@ -0,0 +1,68 @@
+============================
+Display configuration values
+============================
+
+Just like the `Postfix command postconf(1)`_, the ``bin/mailman conf`` command
+lets you dump one or more Mailman configuration variables to standard output
+or a file.
+
+Mailman's configuration is divided in multiple sections which contain multiple
+key-value pairs. The ``bin/mailman conf`` command allows you to display
+a specific key-value pair, or several key-value pairs.
+
+ >>> class FakeArgs:
+ ... key = None
+ ... section = None
+ ... output = None
+ >>> from mailman.commands.cli_conf import Conf
+ >>> command = Conf()
+
+To get a list of all key-value pairs of any section, you need to call the
+command without any options.
+
+ >>> command.process(FakeArgs)
+ [logging.archiver] path: mailman.log
+ ...
+ [passwords] password_length: 8
+ ...
+ [mailman] site_owner: noreply@example.com
+ ...
+
+You can list all the key-value pairs of a specific section.
+
+ >>> FakeArgs.section = 'shell'
+ >>> command.process(FakeArgs)
+ [shell] use_ipython: no
+ [shell] banner: Welcome to the GNU Mailman shell
+ [shell] prompt: >>>
+
+You can also pass a key and display all key-value pairs matching the given
+key, along with the names of the corresponding sections.
+
+ >>> FakeArgs.section = None
+ >>> FakeArgs.key = 'path'
+ >>> command.process(FakeArgs)
+ [logging.archiver] path: mailman.log
+ [logging.locks] path: mailman.log
+ [logging.mischief] path: mailman.log
+ [logging.config] path: mailman.log
+ [logging.error] path: mailman.log
+ [logging.smtp] path: smtp.log
+ [logging.http] path: mailman.log
+ [logging.root] path: mailman.log
+ [logging.fromusenet] path: mailman.log
+ [logging.bounce] path: bounce.log
+ [logging.vette] path: mailman.log
+ [logging.runner] path: mailman.log
+ [logging.subscribe] path: mailman.log
+ [logging.debug] path: debug.log
+
+If you specify both a section and a key, you will get the corresponding value.
+
+ >>> FakeArgs.section = 'mailman'
+ >>> FakeArgs.key = 'site_owner'
+ >>> command.process(FakeArgs)
+ noreply@example.com
+
+
+.. _`Postfix command postconf(1)`: http://www.postfix.org/postconf.1.html
diff --git a/src/mailman/commands/docs/mailmanconf.rst b/src/mailman/commands/docs/mailmanconf.rst
deleted file mode 100644
index 061883bdf..000000000
--- a/src/mailman/commands/docs/mailmanconf.rst
+++ /dev/null
@@ -1,61 +0,0 @@
-==================
-Display configuration values
-==================
-
-Just like the postfix command postconf(1), mailmanconf lets you dump
-one or more mailman configuration variables. Internally, these can be
-retrieved by using the mailman.config.config object. Their structure
-is based on the schema given by src/mailman/config/schema.cfg.
-For more information on how the values are actually set, see
-src/mailman/docs/START.rst
-
-Basically, the configuration is divided in multiple sections which
-contain multiple key-value pairs. The ``bin/mailman mailmanconf``
-command allows you to display a specific or several key-value pairs.
-
- >>> class FakeArgs:
- ... key = None
- ... section = None
- ... output = None
- >>> from mailman.commands.cli_mailmanconf import Mailmanconf
- >>> command = Mailmanconf()
-
-To get a list of all key-value pairs of any section, you need to call
-the command without any options.
-
- >>> command.process(FakeArgs)
- ... [logging.archiver] path: mailman.log
- ... [logging.archiver] level: info
- ... [logging.locks] propagate: no
- ... [logging.locks] level: info
- ... [passwords] configuration: python:mailman.config.passlib
- ... etc.
-
-You can list all the key-value pairs of a specific section.
-
- >>> FakeArgs.section = 'mailman'
- >>> command.process(FakeArgs)
- ... [mailman] filtered_messages_are_preservable: no
- ... [mailman] post_hook:
- ... [mailman] pending_request_life: 3d
- ... etc.
-
-You can also pass a key and display all key-value pairs matching
-the given key, along with the names of the corresponding sections.
-
- >>> FakeArgs.section = 'None'
- >>> FakeArgs.key = 'path'
- >>> command.process(FakeArgs)
- ... [logging.archiver] path: mailman.log
- ... [logging.mischief] path: mailman.log
- ... [logging.error] path: mailman.log
- ... [logging.smtp] path: smtp.log
- ... etc.
-
-If you specify both a section and a key, you will get the corresponding value.
-
- >>> FakeArgs.section = 'mailman'
- >>> FakeArgs.key = 'site_owner'
- >>> command.process(FakeArgs)
- ... changeme@example.com
- \ No newline at end of file