Пример #1
0
def setup(app):
    app.add_domain(
        custom_domain('SwindonConfig',
                      name='swindon',
                      label="Swindon Config",
                      elements=dict(
                          opt=dict(
                              objname="Configuration Option",
                              indextemplate="pair: %s; Config Option",
                              domain_object_class=GenericObject,
                          ),
                          sect=dict(
                              objname="Configuration Section",
                              indextemplate="pair: %s; Config Section",
                              domain_object_class=GenericObject,
                          ),
                          handler=dict(
                              objname="Handler",
                              indextemplate="pair: %s; Request Handler",
                              domain_object_class=GenericObject,
                          ),
                          crdt=dict(
                              objname="CRDT Type",
                              indextemplate="pair: %s; CRDT Type",
                              domain_object_class=GenericObject,
                          ),
                      )))
Пример #2
0
def setup(app):
    app.add_domain(
        custom_domain(
            "ArchDomain",
            name="arch",
            label="FPGA Architecture",
            elements=dict(
                tag=dict(
                    objname="Attribute",
                    indextemplate="pair: %s; Tag Attribute",
                    fields=[
                        GroupedField(
                            "required_parameter", label="Required Attributes", names=["req_param"]
                        ),
                        GroupedField(
                            "optional_parameter", label="Optional Attributes", names=["opt_param"]
                        ),
                        Field("required", label="Tag Required", names=["required"]),
                    ],
                ),
                # var   = dict(
                # objname = "Make Variable",
                # indextemplate = "pair: %s; Make Variable"
                # ),
                # expvar = dict(
                # objname = "Make Variable, exported",
                # indextemplate = "pair: %s; Make Variable, exported"
                # )
            ),
        )
    )
Пример #3
0
def setup(app):
    app.add_node(node=DescRPCArgumentList,
                 html=(html_argumentlist_visit, html_argumentlist_depart),
                 latex=(argumentlist_visit, argumentlist_depart))
    app.add_node(node=DescRPCArgument,
                 html=(html_argument_visit, html_argument_depart),
                 latex=(argument_visit, argument_depart))
    app.add_domain(
        custom_domain(
            'RPCDomain',
            name='rpc',
            label='RPC',
            elements=dict(function=dict(
                objname='RPC Function',
                indextemplate=None,
                parse=parse_macro,
                role='func',
                fields=(docfields.Field('handler',
                                        label="Handler",
                                        names=('handler', ),
                                        has_arg=False),
                        docfields.TypedField('parameter',
                                             label='Parameters',
                                             names=('param', 'parameter',
                                                    'arg', 'argument'),
                                             typerolename='obj',
                                             typenames=('paramtype', 'type')),
                        docfields.TypedField('uriparameter',
                                             label='URI Parameters',
                                             names=('uparam', 'uri_param',
                                                    'uri_parameter'),
                                             typerolename='obj',
                                             typenames=('uriparamtype', )))))))
Пример #4
0
def setup(app):
    app.add_domain(
        custom_domain(
            "SdcDomain",
            name="sdc",
            label="SDC",
            elements=dict(
                command=dict(
                    objname="SDC Command",
                    indextemplate="pair: %s; SDC Command",
                ),
                option=dict(
                    objname="SDC Option",
                    indextemplate="pair: %s; SDC Option",
                ),
                # var   = dict(
                # objname = "Make Variable",
                # indextemplate = "pair: %s; Make Variable"
                # ),
                # expvar = dict(
                # objname = "Make Variable, exported",
                # indextemplate = "pair: %s; Make Variable, exported"
                # )
            ),
        )
    )
Пример #5
0
def setup(app):
    from sphinx.util.docfields import GroupedField
    app.add_node(
        node=desc_cmake_argumentlist,
        html=(html_argumentlist_visit, html_argumentlist_depart),
        latex=(argumentlist_visit, argumentlist_depart),
    )

    app.add_node(
        node=desc_cmake_argument,
        html=(html_argument_visit, html_argument_depart),
        latex=(argument_visit, argument_depart),
    )

    app.add_domain(
        custom_domain(
            'CMakeDomain',
            name='cmake',
            label="CMake",
            elements=dict(
                macro=dict(
                    # role = 'xxx' if differs from macro
                    # objtype = 'xxx' if differs from macro
                    objname="CMake Macro",
                    indextemplate="pair: %s; CMake macro",
                    parse=parse_macro,
                    fields=[
                        GroupedField('parameter',
                                     label="Parameters",
                                     names=['param'])
                    ]),
                var=dict(objname="CMake Variable",
                         indextemplate="pair: %s; CMake variable"),
            )))
Пример #6
0
def setup(app):
    app.add_domain(
        custom_domain('VaggaOptions',
                      name='vagga',
                      label="Vagga Yaml Options",
                      elements=dict(opt=dict(
                          objname="Yaml Option",
                          indextemplate="option: %s",
                      ), )))
def setup(app):
    app.add_domain(
        custom_domain('WOPIDomain',
                      name='wopi',
                      label="WOPI Domain",
                      elements=dict(
                          action=dict(objname="WOPI Action", ),
                          header=dict(objname="WOPI HTTP Header", ),
                          req=dict(objname="WOPI Action Requirement", ),
                      )))
Пример #8
0
def setup(app):
    app.add_domain(custom_domain('VaggaOptions',
        name  = 'vagga',
        label = "Vagga Yaml Options",

        elements = dict(
            opt = dict(
                objname      = "Yaml Option",
                indextemplate = "option: %s",
            ),
        )))
def setup(app):
    app.add_domain(
        custom_domain(
            "WOPIDomain",
            name="wopi",
            label="WOPI Domain",
            elements=dict(
                action=dict(objname="WOPI Action"),
                header=dict(objname="WOPI HTTP Header"),
                req=dict(objname="WOPI Action Requirement"),
            ),
        )
    )
Пример #10
0
def setup(app):
    app.add_domain(custom_domain('TacoDomain',
        name='taco',
        label='Taco',
        elements={
            'action': {
                'objname': 'Action',
                'indextemplate': 'single: %s',
            },
            'object': {
                'objname': 'Special Object',
                'indextemplate': 'single: %s',
            },
        }))
Пример #11
0
def setup(app):
    app.add_domain(
        custom_domain(
            "VaggaConfig",
            name="vagga",
            label="Vagga Config",
            elements=dict(
                opt=dict(objname="Yaml Option", indextemplate="pair: %s; Option"),
                cmd=dict(objname="Vagga Command", indextemplate="pair: %s; Command"),
                volume=dict(objname="Volume Type", indextemplate="pair: %s; Volume Type"),
                step=dict(objname="Build Step", indextemplate="pair: %s; Build Step"),
            ),
        )
    )
Пример #12
0
def setup(app):
    app.add_domain(custom_domain('LithosOptions',
        name  = 'lithos',
        label = "Lithos Yaml Options",

        elements = dict(
            opt = dict(
                objname      = "Yaml Option",
                indextemplate = "pair: %s; Option",
            ),
            volume = dict(
                objname      = "Volume Type",
                indextemplate = "pair: %s; Volume Type",
            ),
        )))
Пример #13
0
def setup(app):
    app.add_domain(
        custom_domain(
            'GnuMakeDomain',
            name='make',
            label="GNU Make",
            elements=dict(
                target=dict(
                    objname="Make Target",
                    indextemplate="pair: %s; Make Target",
                ),
                var=dict(objname="Make Variable",
                         indextemplate="pair: %s; Make Variable"),
                expvar=dict(
                    objname="Make Variable, exported",
                    indextemplate="pair: %s; Make Variable, exported"))))
Пример #14
0
def setup(app):
	app.add_node(
		node=DescRPCArgumentList,
		html=(html_argumentlist_visit, html_argumentlist_depart),
		latex=(argumentlist_visit, argumentlist_depart)
	)
	app.add_node(
		node=DescRPCArgument,
		html=(html_argument_visit, html_argument_depart),
		latex=(argument_visit, argument_depart)
	)
	app.add_domain(custom_domain(
		'RPCDomain',
		name='rpc',
		label='RPC',
		elements=dict(
			function=dict(
				objname='RPC Function',
				indextemplate=None,
				parse=parse_macro,
				role='func',
				fields=(
					docfields.Field(
						'handler',
						label="Handler",
						names=('handler',),
						has_arg=False
					),
					docfields.TypedField(
						'parameter',
						label='Parameters',
						names=('param', 'parameter', 'arg', 'argument'),
						typerolename='obj',
						typenames=('paramtype', 'type')
					),
					docfields.TypedField(
						'uriparameter',
						label='URI Parameters',
						names=('uparam', 'uri_param', 'uri_parameter'),
						typerolename='obj',
						typenames=('uriparamtype',)
					)
				)
			)
		)
	))
Пример #15
0
def setup(app):
    from sphinx.util.docfields import GroupedField
    app.add_node(
        node = desc_cmake_argumentlist,
        html = (html_argumentlist_visit, html_argumentlist_depart),
        latex = (argumentlist_visit, argumentlist_depart),
    )

    app.add_node(
        node = desc_cmake_argument,
        html = (html_argument_visit, html_argument_depart),
        latex = (argument_visit, argument_depart),
        )

    app.add_domain(custom_domain('CMakeDomain',
        name  = 'cmake',
        label = "CMake",
        elements = dict(
            macro = dict(
                objname       = "CMake Macro",
                indextemplate = "pair: %s; CMake macro",
                parse         = parse_macro,
                fields        = [ 
                    GroupedField('parameter',
                        label = "Parameters",
                        names = [ 'param' ])
                ]
            ),
            function = dict(
                objname       = "CMake Function",
                indextemplate = "pair: %s; CMake function",
                parse         = parse_macro,
                fields        = [ 
                    GroupedField('parameter',
                        label = "Parameters",
                        names = [ 'param' ])
                ]
            ),
            var   = dict(
                objname = "CMake Variable",
                indextemplate = "pair: %s; CMake variable"
            ),
        )))    
    app.add_stylesheet('custom.css')
Пример #16
0
def setup(app):
    app.add_autodocumenter(PLPGSQLDocumenter)
    my_domain = custom_domain('PSQLDomain',
            name  = 'psql',
            label = "PostgreSQL",

            elements = dict(
                function = dict(
                    objname      = "Function",
                    role = "func",
                    domain_object_class = SqlObject,
                    indextemplate = "pair: %s; pl/pgsql function",
                ),
                view = dict(
                    objname = "View",
                    domain_object_class = SqlObject,
                    indextemplate = "pair: %s; SQL View"
                ),
                type = dict(
                    objname = 'Type',
                    domain_object_class = SqlObject,
                    indextemplate = "pair: %s; SQL Type"),
    ))
    # Monkey patch for python3 support
    def get_objects(self):
        for (type, name), info in self.data['objects'].items():
            yield (name, name, type, info[0], info[1],
                   self.object_types[type].attrs['searchprio'])

    def clear_doc(self, docname):
      if 'objects' in self.data:
        for key, (fn, _) in list(self.data['objects'].items()):
            if fn == docname:
                del self.data['objects'][key]


    my_domain.get_objects = get_objects
    my_domain.clear_doc = clear_doc
    app.add_domain(my_domain)
    return {
        'version': '0.0.0',  # where docs?
        'parallel_read_safe': True,
    }
def setup(app):
    app.add_domain(
        custom_domain(
            'WOPIDomain',
            name='wopi',
            label="WOPI Domain",
            elements=dict(
                action=dict(
                    objname="WOPI Action",
                ),
                header=dict(
                    objname="WOPI HTTP Header",
                ),
                req=dict(
                    objname="WOPI HTTP Header",
                ),
            )
        )
    )
Пример #18
0
def setup(app):
    app.add_domain(custom_domain('GnuMakeDomain',
        name  = 'make',
        label = "GNU Make", 

        elements = dict(
            target = dict(
                objname      = "Make Target",
                indextemplate = "pair: %s; Make Target",
            ),
            var   = dict(
                objname = "Make Variable",
                indextemplate = "pair: %s; Make Variable"
            ),
            expvar = dict(
                objname = "Make Variable, exported",
                indextemplate = "pair: %s; Make Variable, exported"
            )
        )))
Пример #19
0
def setup(app):
    app.add_domain(
        custom_domain(
            "RRGraphDomain",
            name="rrgraph",
            label="Routing Resource Graph",
            elements=dict(tag=dict(
                objname="Attribute",
                indextemplate="pair: %s; Tag Attribute",
                fields=[
                    GroupedField("required_parameter",
                                 label="Required Attributes",
                                 names=["req_param"]),
                    GroupedField("optional_parameter",
                                 label="Optional Attributes",
                                 names=["opt_param"]),
                    Field("required", label="Tag Required",
                          names=["required"]),
                ],
            ), ),
        ))
Пример #20
0
def setup(app):
    app.add_autodocumenter(PLPGSQLDocumenter)
    my_domain = custom_domain(
        'PSQLDomain',
        name='psql',
        label="PostgreSQL",
        elements=dict(
            function=dict(
                objname="Function",
                role="func",
                domain_object_class=SqlObject,
                indextemplate="pair: %s; pl/pgsql function",
            ),
            view=dict(objname="View",
                      domain_object_class=SqlObject,
                      indextemplate="pair: %s; SQL View"),
            type=dict(objname='Type',
                      domain_object_class=SqlObject,
                      indextemplate="pair: %s; SQL Type"),
        ))

    # Monkey patch for python3 support
    def get_objects(self):
        for (type, name), info in self.data['objects'].items():
            yield (name, name, type, info[0], info[1],
                   self.object_types[type].attrs['searchprio'])

    def clear_doc(self, docname):
        if 'objects' in self.data:
            for key, (fn, _) in list(self.data['objects'].items()):
                if fn == docname:
                    del self.data['objects'][key]

    my_domain.get_objects = get_objects
    my_domain.clear_doc = clear_doc
    app.add_domain(my_domain)
    return {
        'version': '0.0.0',  # where docs?
        'parallel_read_safe': True,
    }
Пример #21
0
def setup(app):
    app.add_domain(custom_domain('RRGraphDomain',
        name  = 'rrgraph',
        label = "Routing Resource Graph",

        elements = dict(
            tag = dict(
                objname       = "Attribute",
                indextemplate = "pair: %s; Tag Attribute",
                fields        = [
                    GroupedField('required_parameter',
                        label = "Required Attributes",
                        names = [ 'req_param' ]),
                    GroupedField('optional_parameter',
                        label = "Optional Attributes",
                        names = [ 'opt_param' ]),
                    Field('required',
                        label = "Tag Required",
                        names = [ 'required' ])
                ]
            ),
        )))
Пример #22
0
def setup(app):
    app.add_domain(
        custom_domain('VaggaConfig',
                      name='vagga',
                      label="Vagga Config",
                      elements=dict(
                          opt=dict(
                              objname="Yaml Option",
                              indextemplate="pair: %s; Option",
                          ),
                          cmd=dict(
                              objname="Vagga Command",
                              indextemplate="pair: %s; Command",
                          ),
                          volume=dict(
                              objname="Volume Type",
                              indextemplate="pair: %s; Volume Type",
                          ),
                          step=dict(
                              objname="Build Step",
                              indextemplate="pair: %s; Build Step",
                          ),
                      )))
Пример #23
0
def setup(app):
    app.add_domain(
        custom_domain('LithosOptions',
                      name='lithos',
                      label="Lithos Yaml Options",
                      elements=dict(
                          opt=dict(
                              objname="Yaml Option",
                              indextemplate="pair: %s; Option",
                          ),
                          popt=dict(
                              objname="Process Config Option",
                              indextemplate="pair: %s; Process Config Option",
                          ),
                          bopt=dict(
                              objname="Bridge Setup Option",
                              indextemplate="pair: %s; Bridge Setup Option",
                          ),
                          volume=dict(
                              objname="Volume Type",
                              indextemplate="pair: %s; Volume Type",
                          ),
                      )))
Пример #24
0
                 ('\[', Operator), (r'[!@#$%^&*+=|\\~`/?<>.-]+', Operator)],
        'string': [('\"', String, '#pop'), (r'\\.', String.Escape),
                   (r'[^"\\]+', String)],
        'string2': [('\'', String, '#pop'), (r'\\.', String.Escape),
                    ('{', Operator, 'braces'), (r'[^\'\\{]+', String)],
        'braces': [('}', Operator, '#pop'),
                   include('root')],
        'brackets': [('\)', Operator, '#pop'),
                     include('root')]
    }


minilangDomain = custom_domain(
    'MinilangDomain',
    name='mini',
    label="mini",
    elements=dict(function=dict(objname="Minilang Function",
                                indextemplate="pair: %s; Minilang Function"),
                  method=dict(objname="Minilang Method",
                              indextemplate="pair: %s; Minilang Method")))


class MiniStyle(Style):
    default_style = ""
    styles = {
        Keyword: '#0098dd',
        Name.Function: '#df631c',
        Comment: '#a0a1a7',
        String: '#c5a332',
        String.Escape: '#823ff1',
        Error: '#ff0000',
        Number: '#ce33c0',