summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-api-set-translator/conf.py
blob: 3b56c39e8ea2b349b4504b9a5ecccf6519d7811f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# set this by test
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from docutils.writers.docutils_xml import XMLTranslator

from sphinx.writers.html import HTML5Translator
from sphinx.writers.latex import LaTeXTranslator
from sphinx.writers.manpage import ManualPageTranslator
from sphinx.writers.texinfo import TexinfoTranslator
from sphinx.writers.text import TextTranslator

project = 'test'


class ConfHTMLTranslator(HTML5Translator):
    pass


class ConfDirHTMLTranslator(HTML5Translator):
    pass


class ConfSingleHTMLTranslator(HTML5Translator):
    pass


class ConfPickleTranslator(HTML5Translator):
    pass


class ConfJsonTranslator(HTML5Translator):
    pass


class ConfLaTeXTranslator(LaTeXTranslator):
    pass


class ConfManualPageTranslator(ManualPageTranslator):
    pass


class ConfTexinfoTranslator(TexinfoTranslator):
    pass


class ConfTextTranslator(TextTranslator):
    pass


class ConfXMLTranslator(XMLTranslator):
    pass


class ConfPseudoXMLTranslator(XMLTranslator):
    pass


def setup(app):
    app.set_translator('html', ConfHTMLTranslator)
    app.set_translator('dirhtml', ConfDirHTMLTranslator)
    app.set_translator('singlehtml', ConfSingleHTMLTranslator)
    app.set_translator('pickle', ConfPickleTranslator)
    app.set_translator('json', ConfJsonTranslator)
    app.set_translator('latex', ConfLaTeXTranslator)
    app.set_translator('man', ConfManualPageTranslator)
    app.set_translator('texinfo', ConfTexinfoTranslator)
    app.set_translator('text', ConfTextTranslator)
    app.set_translator('xml', ConfXMLTranslator)
    app.set_translator('pseudoxml', ConfPseudoXMLTranslator)