File: helloworld.py

package info (click to toggle)
sphinx 4.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,120 kB
  • sloc: python: 72,868; javascript: 14,215; perl: 422; makefile: 247; sh: 57; xml: 19; ansic: 1
file content (19 lines) | stat: -rw-r--r-- 400 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from docutils import nodes
from docutils.parsers.rst import Directive


class HelloWorld(Directive):

    def run(self):
        paragraph_node = nodes.paragraph(text='Hello World!')
        return [paragraph_node]


def setup(app):
    app.add_directive("helloworld", HelloWorld)

    return {
        'version': '0.1',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }