comparison docs/commandline.rst @ 71:854c5d361011

Documentation cleanup.
author Brian Neal <bgneal@gmail.com>
date Tue, 23 Jul 2013 20:18:05 -0500
parents 0a3e4bc49118
children
comparison
equal deleted inserted replaced
70:753974fc7619 71:854c5d361011
2 ====================== 2 ======================
3 3
4 Overview 4 Overview
5 -------- 5 --------
6 6
7 The ``m209`` command-line utility peforms three functions: 7 The ``m209`` command-line utility performs three functions:
8 8
9 * Creates key list files 9 * Creates key list files
10 * Encrypts text, either given on the command line or read from a file 10 * Encrypts text, either given on the command line or read from a file
11 * Decrypts text, either given on the command line or read from a file 11 * Decrypts text, either given on the command line or read from a file
12 12
152 152
153 ``-z`` or ``--key-file`` 153 ``-z`` or ``--key-file``
154 This option names the key list file. If not given, the default of 154 This option names the key list file. If not given, the default of
155 ``m209keys.cfg`` is used. 155 ``m209keys.cfg`` is used.
156 156
157 ``-t`` or ``--file`` 157 ``-f`` or ``--file``
158 This option specifies the file that contains the text to encrypt. If the 158 This option specifies the file that contains the text to encrypt. If the
159 filename is given as ``-`` then input is read directly from ``stdin``. Note 159 filename is given as ``-`` then input is read directly from ``stdin``. Note
160 that either this option or the ``-t`` option must be specified, but not 160 that either this option or the ``-t`` option must be specified, but not
161 both. 161 both.
162 162
171 key list file given by the ``-z`` option. If this option is omitted, a key 171 key list file given by the ``-z`` option. If this option is omitted, a key
172 list from the key list file is chosen at random. 172 list from the key list file is chosen at random.
173 173
174 ``-e`` or ``--ext-ind`` 174 ``-e`` or ``--ext-ind``
175 This option specifies the six-letter external message indicator, which is an 175 This option specifies the six-letter external message indicator, which is an
176 encryption parameter as explained in the 1944 manual (see the references). 176 encryption parameter as explained in the 1944 manual (see
177 Each letter must exist on the key wheels from left to right. If this option 177 :ref:`references-label` [5] & [7]). Each letter must exist on the key wheels
178 is omitted, an external message indicator is chosen at random. 178 from left to right. If this option is omitted, an external message indicator
179 is chosen at random.
179 180
180 ``-s`` or ``--sys-ind`` 181 ``-s`` or ``--sys-ind``
181 This option specifies the one-letter system indicator, which is an 182 This option specifies the one-letter system indicator, which is an
182 encryption parameter as explained in the 1944 manual (see the references). 183 encryption parameter as explained in the 1944 manual (see
183 This must be a letter from ``A`` to ``Z``. If not given, one is chosen at 184 :ref:`references-label` [5] & [7]). This must be a letter from ``A`` to ``Z``.
184 random. 185 If not given, one is chosen at random.
185 186
186 .. NOTE:: 187 .. NOTE::
187 188
188 An actual M-209 can only accept the letters ``A-Z``. When using an actual 189 An actual M-209 can only accept the letters ``A-Z``. When using an actual
189 M-209, space characters must be input as the letter ``Z``. Numbers must 190 M-209, space characters must be input as the letter ``Z``. Numbers must
224 on the ``decrypt`` command, type the following:: 225 on the ``decrypt`` command, type the following::
225 226
226 $ m209 decrypt --help 227 $ m209 decrypt --help
227 usage: m209 decrypt [-h] [-z KEY_FILE] [-f FILE] [-t TEXT] 228 usage: m209 decrypt [-h] [-z KEY_FILE] [-f FILE] [-t TEXT]
228 229
229 Decyrpt text from a file or command-line 230 Decrypt text from a file or command-line
230 231
231 optional arguments: 232 optional arguments:
232 -h, --help show this help message and exit 233 -h, --help show this help message and exit
233 -z KEY_FILE, --key-file KEY_FILE 234 -z KEY_FILE, --key-file KEY_FILE
234 path to key list file [default: m209keys.cfg] 235 path to key list file [default: m209keys.cfg]