nested field lists in custom directives

Robin Shannon <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CAMT3hU6LA2+xnttQg4XFSooODUsC7AJA98TJu6jttDq0u-iG_A@mail.gmail.com>
G'day,

Firstly, thanks to everybody who has worked on ReST/docutils, you're
awesome.

I'm trying to create a custom directive for videos (my only output is
html), and I would like to be able to include tracks (subtitle files)
within the directive.

For those unfamiliar with html5 video, the output looks something like this:
<video autoplay>
<source src="foo.ogg">
<track kind="subtitles" src="foo.vtt" srclang="en">
</video>

What I'd like is a directive with nested field lists. eg:
.. video:: sources
    :autoplay: True
    :track: :src: foo.vtt
               :srclang: en
               :kind: subtitles
    :controls: false

I saw nested lists like this somewhere in the sandbox (though now I can't
find it again), but I think it was just a suggestion rather than an
actually implemented directive. If this is possible, how would it work with
option_spec in the directive definition? Alternatively is there a better
way of solving this problem?

Thank you,
Robin.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.