diff options
author | Jan Luebbe <jlu@pengutronix.de> | 2014-07-11 20:51:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-14 10:42:31 +0200 |
commit | c949b66674a8e625db0e75c522efce5597b42255 (patch) | |
tree | f0371fd9ada2212b604f7c8de5c1010cbafbbd98 /Documentation | |
parent | a6ab59d179b58bf9d27560e13d69e11ea9127bf4 (diff) | |
download | barebox-c949b66674a8e625db0e75c522efce5597b42255.tar.gz barebox-c949b66674a8e625db0e75c522efce5597b42255.tar.xz |
Documentation: use command groups
The help definition already contained a group declaration.
This is now reused for the HTML documentation.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/commands.rst | 86 | ||||
-rwxr-xr-x | Documentation/gen_commands.py | 13 |
2 files changed, 95 insertions, 4 deletions
diff --git a/Documentation/commands.rst b/Documentation/commands.rst index 55b04f6e56..0dc9e1bcf4 100644 --- a/Documentation/commands.rst +++ b/Documentation/commands.rst @@ -1,9 +1,91 @@ Command reference ================= +Information +----------- .. toctree:: + :titlesonly: :glob: - :maxdepth: 1 - commands/* + commands/info/* + +Booting +------- +.. toctree:: + :titlesonly: + :glob: + + commands/boot/* + +Partitions and Filesystems +-------------------------- +.. toctree:: + :titlesonly: + :glob: + + commands/part/* + +Environment +----------- +.. toctree:: + :titlesonly: + :glob: + + commands/env/* + +Files +----- +.. toctree:: + :titlesonly: + :glob: + + commands/file/* + +Shell Scripting +--------------- +.. toctree:: + :titlesonly: + :glob: + + commands/script/* + +Console and Framebuffer +----------------------- +.. toctree:: + :titlesonly: + :glob: + + commands/console/* + +Memory +------ +.. toctree:: + :titlesonly: + :glob: + + commands/mem/* + +Hardware Manipulation +--------------------- +.. toctree:: + :titlesonly: + :glob: + + commands/hwmanip/* + +Miscelleanous +------------- +.. toctree:: + :titlesonly: + :glob: + + commands/misc/* + +Networking +---------- +.. toctree:: + :titlesonly: + :glob: + + commands/net/* diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py index 4e33ccaea6..d3db350bf7 100755 --- a/Documentation/gen_commands.py +++ b/Documentation/gen_commands.py @@ -1,5 +1,6 @@ #!/usr/bin/python +import errno import os import re import sys @@ -76,7 +77,7 @@ def parse_c(name): x = CMD_GROUP.match(line) if x: last = cmd['c_group'] - last.append(x.group(1).decode("string_escape")) + last.append(x.group(1).split('_')[-1].lower()) continue x = CONT.match(line) if x: @@ -159,6 +160,14 @@ for name in CMDS.keys(): for name, cmd in CMDS.items(): #pprint({name: cmd}) rst = gen_rst(name, cmd) - target = os.path.join(sys.argv[2], name+'.rst') + subdir = os.path.join(sys.argv[2], cmd['c_group'][0]) + try: + os.makedirs(subdir) + except OSError as e: + if e.errno == errno.EEXIST and os.path.isdir(subdir): + pass + else: + raise + target = os.path.join(subdir, name+'.rst') file(target, 'w').write(rst) |