MCPcopy Index your code
hub / github.com/aws/aws-cli / _convert_doc_content

Method _convert_doc_content

awscli/help.py:241–258  ·  view source on GitHub ↗
(self, contents)

Source from the content-addressed store, hash-verified

239 """
240
241 def _convert_doc_content(self, contents):
242 settings_overrides = self._DEFAULT_DOCUTILS_SETTINGS_OVERRIDES.copy()
243 settings_overrides["report_level"] = 3
244 man_contents = publish_string(
245 contents,
246 writer=manpage.Writer(),
247 settings_overrides=self._DEFAULT_DOCUTILS_SETTINGS_OVERRIDES,
248 )
249 if self._exists_on_path('groff'):
250 cmdline = ['groff', '-m', 'man', '-T', 'ascii']
251 elif self._exists_on_path('mandoc'):
252 cmdline = ['mandoc', '-T', 'ascii']
253 else:
254 raise ExecutableNotFoundError('groff or mandoc')
255 LOG.debug("Running command: %s", cmdline)
256 p3 = self._popen(cmdline, stdin=PIPE, stdout=PIPE, stderr=PIPE)
257 output = p3.communicate(input=man_contents)[0]
258 return output
259
260
261class PosixBrowserHelpRenderer(BrowserHelpRenderer):

Callers

nothing calls this directly

Calls 5

copyMethod · 0.45
_exists_on_pathMethod · 0.45
_popenMethod · 0.45
communicateMethod · 0.45

Tested by

no test coverage detected