Home | History | Annotate | Download | only in docs
      1 # [devil.utils.markdown](https://github.com/catapult-project/catapult/blob/master/devil/devil/utils/markdown.py)
      2 
      3 *This page was autogenerated by `devil/utils/markdown.py --module-link https://github.com/catapult-project/catapult/blob/master/devil/devil/utils/markdown.py`*
      4 
      5 ## MarkdownHelpAction
      6 
      7 ### MarkdownHelpAction.\_\_init\_\_
      8 
      9 ### MarkdownHelpAction.\_\_call\_\_
     10 
     11 ## MarkdownHelpFormatter
     12 
     13 A really bare-bones argparse help formatter that generates valid markdown.
     14 ```
     15   This will generate something like:
     16 
     17   usage
     18 
     19   # **section heading**:
     20 
     21   ## **--argument-one**
     22 
     23   \`\`\`
     24   argument-one help text
     25   \`\`\`
     26 
     27 ```
     28 
     29 
     30 ### MarkdownHelpFormatter.format\_help
     31 
     32 ### MarkdownHelpFormatter.start\_section
     33 
     34 ### md\_bold
     35 
     36 Returns markdown-formatted bold text.
     37 ### md\_code
     38 
     39 Returns a markdown-formatted code block in the given language.
     40 ### md\_escape
     41 
     42 Escapes \* and \_.
     43 ### md\_heading
     44 
     45 Returns markdown-formatted heading.
     46 ### md\_inline\_code
     47 
     48 Returns markdown-formatted inline code.
     49 ### md\_italic
     50 
     51 Returns markdown-formatted italic text.
     52 ### md\_link
     53 
     54 returns a markdown-formatted link.
     55 ### add\_md\_help\_argument
     56 
     57 Adds --md-help to the given argparse.ArgumentParser.
     58 ```
     59   Running a script with --md-help will print the help text for that script
     60   as valid markdown.
     61 
     62   Args:
     63     parser: The ArgumentParser to which --md-help should be added.
     64 ```
     65 
     66 
     67 ### load\_module\_from\_path
     68 
     69 Load a module given only the path name.
     70 ```
     71   Also loads package modules as necessary.
     72 
     73   Args:
     74     module_path: An absolute path to a python module.
     75   Returns:
     76     The module object for the given path.
     77 ```
     78 
     79 
     80 ### md\_module
     81 
     82 Write markdown documentation for a class.
     83 ```
     84   Documents public classes and functions.
     85 
     86   Args:
     87     class_obj: a types.TypeType object for the class that should be
     88       documented.
     89   Returns:
     90     A list of markdown-formatted lines.
     91 ```
     92 
     93 
     94 ### md\_class
     95 
     96 Write markdown documentation for a class.
     97 ```
     98   Documents public methods. Does not currently document subclasses.
     99 
    100   Args:
    101     class_obj: a types.TypeType object for the class that should be
    102       documented.
    103   Returns:
    104     A list of markdown-formatted lines.
    105 ```
    106 
    107 
    108 ### md\_docstring
    109 
    110 Write a markdown-formatted docstring.
    111 ```
    112   Returns:
    113     A list of markdown-formatted lines.
    114 ```
    115 
    116 
    117 ### md\_function
    118 
    119 Write markdown documentation for a function.
    120 ```
    121   Args:
    122     func_obj: a types.FunctionType object for the function that should be
    123       documented.
    124   Returns:
    125     A list of markdown-formatted lines.
    126 ```
    127 
    128 
    129 ### main
    130 
    131 Write markdown documentation for the module at the provided path.
    132 ```
    133   Args:
    134     raw_args: the raw command-line args. Usually sys.argv[1:].
    135   Returns:
    136     An integer exit code. 0 for success, non-zero for failure.
    137 ```
    138 
    139 
    140