Transform reST list item for rst2html output

65 views Asked by At

I have a reStructuredText document with todo list items:

Vim
===

- ✓ (2021-11-05) RST Section text object
  (drop it in favor of env text object)

  Probably should be based on the output of ``:Toc`` command to properly
  identify all sub sections if this is needed.

- ✓ (2021-11-05) RST "Environment" text object

Which could be setup in vim to have nicely colored unicode checkmark and (date)

enter image description here

Regular rst2html.py knows nothing about those checkmarks and dates, but it looks like it is possible to use Transform feature of docutils to add css classes to those list items.

Probably documentation of the docutils is written for the more experienced people, but I could not find an easy guide on how to:

  1. create your own Transform
  2. apply it to your reStructuredText document.

PS, I could get the structure of the document with rst2pseudoxml.py and I can see elements I should change:

            <bullet_list bullet="-">
                <list_item>
                    <paragraph>
                        вњ“ (2021-11-05) RST Section text object
                        (drop it in favor of env text object)

But have no clue where to start from.

0

There are 0 answers