Rizin
unix-like reverse engineering framework and cli tools
manpage Namespace Reference

Functions

def make_link_node (rawtext, app, name, manpage_num, options)
 
def man_role (name, rawtext, text, lineno, inliner, options={}, content=[])
 
def setup (app)
 

Function Documentation

◆ make_link_node()

def manpage.make_link_node (   rawtext,
  app,
  name,
  manpage_num,
  options 
)

Definition at line 18 of file manpage.py.

18 def make_link_node(rawtext, app, name, manpage_num, options):
19  ref = app.config.man_url_regex
20  if not ref:
21  ref = "https://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 
def make_link_node(rawtext, app, name, manpage_num, options)
Definition: manpage.py:18

Referenced by man_role().

◆ man_role()

def manpage.man_role (   name,
  rawtext,
  text,
  lineno,
  inliner,
  options = {},
  content = [] 
)

Definition at line 30 of file manpage.py.

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 
def man_role(name, rawtext, text, lineno, inliner, options={}, content=[])
Definition: manpage.py:30

References make_link_node().

◆ setup()

def manpage.setup (   app)

Definition at line 41 of file manpage.py.

41 def setup(app):
42  app.add_role('man', man_role)
43  app.add_config_value('man_url_regex', None, 'env')
44  return
45 
def setup(app)
Definition: manpage.py:41