[OpenStack-docs] Better way to display shell commands
Joseph Robinson
joseph.robinson at RACKSPACE.COM
Tue Jul 5 22:34:44 UTC 2016
Reply inline -->
On 6/07/2016, 8:16 AM, "Caballero Abraham, Rodrigo"
<rodrigo.caballero.abraham at intel.com> wrote:
>Hi,
>I would give it +1 but I see two issues.
>1. code-block:: bash must be changed globally to prompt:: and that is a
>major undertaking affecting basically all projects. Otherwise, we would
>be building an inconsistency on purpose.
>2. There are two types of commands, sudo/admin and user. Prompt can
>handle this but it does mean that we need to be extra careful when
>replacing the code-block directives.
>
>A script could handle the replacements automatically but we would need to
>debug after the replacement.
I am good to volunteer to help out with the debugging effort, if we go
ahead with the new prompt markup.
Best Regards,
Joe Robinson
Information Developer II
-------------------------------
Joseph.Robinson at Rackspace.com
>
>Those are my 2 cents.
>Regards,
>
>Rodrigo Caballero
>
>Sr. Technical Writer
>rodrigo.caballero.abraham at intel.com
>VISIT US AT: http://www.intel.com
>
>
>
>
>> -----Original Message-----
>> From: Lana Brindley [mailto:openstack at lanabrindley.com]
>> Sent: Tuesday, July 5, 2016 5:06 PM
>> To: openstack-docs at lists.openstack.org; Andreas Jaeger
>> <aj at suse.com>
>> Subject: Re: [OpenStack-docs] Better way to display shell commands
>>
>> Ah, this looks great!
>>
>> Andreas: how easy is it to install this extension? Will it break things?
>>
>> Lana
>>
>> On 06/07/16 05:26, Ronald Bradford wrote:
>> > I tested the demo and highlighting of code conveniently excludes
>> prompts (achieved via css syntax).
>> > It is certainly a plus to be able to cut/paste code blocks more
>>easily.
>> >
>> > +1
>> >
>> > Ronald Bradford
>> >
>> > Web Site: http://ronaldbradford.com <http://ronaldbradford.com/>
>> > LinkedIn: http://www.linkedin.com/in/ronaldbradford
>> > Twitter: @RonaldBradford <http://twitter.com/ronaldbradford>
>> > Skype: RonaldBradford
>> > GTalk: Ronald.Bradford
>> > IRC: rbradfor
>> >
>> >
>> > On Tue, Jul 5, 2016 at 4:43 AM, Adrien Cunin <adrien at adriencunin.fr
>> <mailto:adrien at adriencunin.fr>> wrote:
>> >
>> > Hi,
>> >
>> > From what I can see we usually use
>> >
>> > .. code-block:: console
>> >
>> > or
>> >
>> > .. code-block:: shell-session
>> >
>> > (which actually are the same)
>> >
>> > to show commands that are to be executed by the user such as
>> >
>> > # apt-get install foo
>> > # echo 1 > bar
>> >
>> > The main issue, and the reason I started looking into this, is
>>that the
>> > html output doesn't make it easy to select commands (for
>> copy/pasting
>> > typically) without the prompt.
>> >
>> > Turns out there is a Sphinx extension to do just this:
>> > https://github.com/sbrunner/sphinx-prompt
>> >
>> > With this extension, the following
>> >
>> > .. prompt:: bash #
>> >
>> > apt-get install foo
>> > echo 1 > bar
>> >
>> > will have the expected result.
>> > That is: looks similar to the previous version, but one can easily
>> > select commands without the prompt.
>> >
>> > Does it sound like a good idea?
>> >
>> > We'd need first to enable the Sphinx extension wherever we use
>> Sphinx.
>> > Does that actually require to patch each git repository that
>>contains
>> > documentation or do we have another way of doing it globally?
>> > Then, documentations should start using ".. prompt:: bash" instead
>> of
>> > ".. code-block:: console" when appropriate - the change could be
>> > automated or not.
>> >
>> > Adrien
>> >
>> >
>> > _______________________________________________
>> > OpenStack-docs mailing list
>> > OpenStack-docs at lists.openstack.org <mailto:OpenStack-
>> docs at lists.openstack.org>
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > OpenStack-docs mailing list
>> > OpenStack-docs at lists.openstack.org
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>> >
>>
>> --
>> Lana Brindley
>> Technical Writer
>> Rackspace Cloud Builders Australia
>> http://lanabrindley.com
>
>_______________________________________________
>OpenStack-docs mailing list
>OpenStack-docs at lists.openstack.org
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
________________________________
Rackspace Hosting Australia PTY LTD a company registered in the state of Victoria, Australia (company registered number ACN 153 275 524) whose registered office is at Level 1, 37 Pitt Street, Sydney, NSW 2000, Australia. Rackspace Hosting Australia PTY LTD privacy policy can be viewed at www.rackspace.com.au/company/legal-privacy-statement.php - This e-mail message may contain confidential or privileged information intended for the recipient. Any dissemination, distribution or copying of the enclosed material is prohibited. If you receive this transmission in error, please notify us immediately by e-mail at abuse at rackspace.com and delete the original message. Your cooperation is appreciated.
More information about the OpenStack-docs
mailing list