Skip to content

Commit 17d2469

Browse files
author
Troy Melhase
committed
Fixes minor inconsistencies between docs and script arguments/options.
1 parent 0027823 commit 17d2469

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

bin/j2py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ def config(argv):
177177

178178
add = parser.add_argument
179179
add(dest='inputfile', nargs='?',
180-
help='Read from INPUTFILE. May use - for stdin (default).',
181-
metavar='INPUTFILE', default=None)
180+
help='Read from INPUT. May use - for stdin (default).',
181+
metavar='INPUT', default=None)
182182
add(dest='outputfile', nargs='?',
183-
help='Write to OUTPUTFILE. May use - for stdout (default).',
184-
metavar='OUTPUTFILE', default=None)
183+
help='Write to OUTPUT. May use - for stdout (default).',
184+
metavar='OUTPUT', default=None)
185185
add('-c', '--config', dest='configs',
186186
help='Use CONFIG file or module. May be repeated.',
187187
metavar='CONFIG', default=[], action='append')
188-
add('-d', '--configdir', dest='configdirs',
188+
add('-d', '--config-dir', dest='configdirs',
189189
help='Use DIR to match input filename with config filename.',
190190
metavar='DIR', default=[], action='append')
191191
add('-f', '--profile', dest='profile',
@@ -197,16 +197,16 @@ def config(argv):
197197
add('-k', '--skip-compile', dest='skipcompile',
198198
help='Skip compile check on translated source.',
199199
default=False, action='store_true')
200-
add('-l', '--loglevel', dest='loglevel',
200+
add('-l', '--log-level', dest='loglevel',
201201
help='Set log level by name or value.',
202202
default='WARN', type=logLevel)
203-
add('-n', '--nodefaults', dest='includedefaults',
203+
add('-n', '--no-defaults', dest='includedefaults',
204204
help='Ignore default configuration module.',
205205
default=True, action='store_false')
206206
add('-p', '--python-tree', dest='pytree',
207207
help='Print python object tree to stderr.',
208208
default=False, action='store_true')
209-
add('-r', '--nocolor', dest='nocolor',
209+
add('-r', '--no-color', dest='nocolor',
210210
help='Disable color output.' +\
211211
(' No effect on Win OS.' if isWindows() else ''),
212212
default=False, action='store_true')

doc/usage.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ to change code generation behavior, refer to the [customization](customization.m
2727
page.
2828

2929

30-
Code generation:
30+
#### Code Generation
3131

3232
* `[INPUT]`
3333

@@ -39,7 +39,7 @@ Code generation:
3939
Write to the given file. Specify `-` for `stdout`. If not
4040
given the command will write to `stdout`.
4141

42-
* `-l LEVEL`, `--loglevel LEVEL`
42+
* `-l LEVEL`, `--log-level LEVEL`
4343

4444
Set the logging package to the specified log level. The log level
4545
may given as an integer (e.g., `50` for critical) or by name
@@ -57,30 +57,32 @@ Code generation:
5757
See the [customization](customization.md) page for details of the
5858
configuration system and available configuration points.
5959

60-
* `-d DIR`, `--configdir DIR`
60+
* `-d DIR`, `--config-dir DIR`
6161

6262
Use the given directory name to match input file names to
63-
configuration file names. For example, to translate
63+
configuration file names. This option may be repeated.
64+
65+
For example, to translate
6466
`FooBar.java` and use the configuration stored in
6567
`./cfg/FooBar.py`, specify `-d ./cfg`.
6668

6769
* `-k`, `--skip-compile`
6870

6971
Do not check the output for valid Python syntax by byte compiling it.
7072

71-
* `-n`, `--nodefaults`
73+
* `-n`, `--no-defaults`
7274

7375
Ignore the default configuration module.
7476

75-
* `-r`, `--nocolor`
77+
* `-r`, `--no-color`
7678

7779
Disable colorized output.
7880

7981
Colorized output is not available on Windows and this option has no effect
8082
there.
8183

8284

83-
Development:
85+
#### Development
8486

8587
* `-p`, `--python-tree`
8688

@@ -103,7 +105,7 @@ Development:
103105
`-j`.
104106

105107

106-
Meta:
108+
#### Meta
107109

108110
* `-h`, `--help`
109111

0 commit comments

Comments
 (0)