mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: Re: generated command references sometimes render a solid blob of text
Date: Wed, 2 Jul 2014 09:00:24 +0200	[thread overview]
Message-ID: <20140702070024.GC14257@pengutronix.de> (raw)
In-Reply-To: <alpine.LFD.2.11.1407010832100.28138@localhost>

On Tue, Jul 01, 2014 at 08:43:34AM -0400, Robert P. J. Day wrote:
> 
>   i'm sure everyone else already knows this, but some of the HTML
> files generated for the command reference list sometimes render the
> synopsis or description as a single, unbroken blob of text. for
> example, the reference page for "addpart" has a single line for the
> entire Description field. another example: the Synopsis field for the
> "let" command. and so on.
> 
>   it's easy to see that the .rst files that are created don't properly
> handle paragraph breaks or lists. so is that just a known issue?
> 
>   oh, and one more oddity. if you look at the generated page for the
> "let" command, it appears that the the double hyphen is replaced by a
> longer "em" hyphen. here's part of the generated let.rst file:
> 
> Synopsis
> ^^^^^^^^
> Supported operations are in order of decreasing precedence:
> X++, X--
> ++X, --X
> +X, -X
> !X, ~X
> ...
> 
> but look what shows up in the generated HTML file:
> 
>   X++, X– ++X, –X +X, -X
> 
> notice how occurrences of "--" in the .rst file are replaced by the
> longer hyphen in the HTML file. just an observation.

I think we have to live with this for a while. Our options are:

- reformat Documentation/commands/*.rst manually and no longer
  autogenerate them. It won't take long until they get out of
  sync with the in-binary help texts. No good option
- Add some additional BAREBOX_CMD_HELP_* Macros for special
  cases in some commands like the 'let' command. Could be a
  interim solution
- Instead of rendering Documentation/commands/*.rst from the
  C source files we could do the other way round: render
  the in-binary command help texts from Documentation/commands/*.rst.

I like the last option. sphinx has a plain text renderer. This
could be used to generate <command>.txt files which then could
be included into an environment snippet. help <command> could
be a shortcut to cat /doc/commands/<command>.txt.

Sascha

-- 
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

      parent reply	other threads:[~2014-07-02  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 12:43 Robert P. J. Day
2014-07-01 14:26 ` Holger Schurig
2014-07-01 15:58   ` Robert P. J. Day
2014-07-02 10:41   ` Jan Lübbe
2014-07-02 11:45     ` Holger Schurig
2014-07-02 18:34       ` Robert P. J. Day
2014-07-02  7:00 ` 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=20140702070024.GC14257@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=rpjday@crashcourse.ca \
    /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