mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jan Luebbe <jlu@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] Documentation: use command groups
Date: Mon, 14 Jul 2014 10:42:57 +0200	[thread overview]
Message-ID: <20140714084257.GY23235@pengutronix.de> (raw)
In-Reply-To: <1405104718-15156-1-git-send-email-jlu@pengutronix.de>

On Fri, Jul 11, 2014 at 08:51:58PM +0200, Jan Luebbe wrote:
> The help definition already contained a group declaration.
> This is now reused for the HTML documentation.
> 
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>

Good idea! Applied, thanks

Sascha

> ---
>  Documentation/commands.rst    | 86 ++++++++++++++++++++++++++++++++++++++++++-
>  Documentation/gen_commands.py | 13 ++++++-
>  2 files changed, 95 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/commands.rst b/Documentation/commands.rst
> index 55b04f6..0dc9e1b 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 4e33cca..d3db350 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)
>  
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2014-07-14  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 18:51 Jan Luebbe
2014-07-14  8:42 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140714084257.GY23235@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jlu@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox