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