Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
libuv
docs
src
sphinx-plugins
manpage.py
Go to the documentation of this file.
1
# encoding: utf-8
2
3
#
4
# Copyright (c) 2013 Dariusz Dwornikowski. All rights reserved.
5
#
6
# Adapted from https://github.com/tdi/sphinxcontrib-manpage
7
# License: Apache 2
8
#
9
10
11
import
re
12
13
from
docutils
import
nodes, utils
14
from
docutils.parsers.rst.roles
import
set_classes
15
from
string
import
Template
16
17
18
def
make_link_node
(rawtext, app, name, manpage_num, options):
19
ref = app.config.man_url_regex
20
if
not
ref:
21
ref =
"http://man7.org/linux/man-pages/man%s/%s.%s.html"
%(manpage_num, name, manpage_num)
22
else
:
23
s = Template(ref)
24
ref = s.substitute(num=manpage_num, topic=name)
25
set_classes(options)
26
node = nodes.reference(rawtext,
"%s(%s)"
% (name, manpage_num), refuri=ref, **options)
27
return
node
28
29
30
def
man_role
(name, rawtext, text, lineno, inliner, options={}, content=[]):
31
app = inliner.document.settings.env.app
32
p = re.compile(
"([a-zA-Z0-9_\.-_]+)\((\d)\)"
)
33
m = p.match(text)
34
35
manpage_num = m.group(2)
36
name = m.group(1)
37
node =
make_link_node
(rawtext, app, name, manpage_num, options)
38
return
[node], []
39
40
41
def
setup
(app):
42
app.add_role(
'man'
, man_role)
43
app.add_config_value(
'man_url_regex'
,
None
,
'env'
)
44
return
45
manpage.make_link_node
def make_link_node(rawtext, app, name, manpage_num, options)
Definition:
manpage.py:18
manpage.man_role
def man_role(name, rawtext, text, lineno, inliner, options={}, content=[])
Definition:
manpage.py:30
manpage.setup
def setup(app)
Definition:
manpage.py:41
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:30