
    p                         d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlmZ ddl	m
Z
 ddlmZ  G d	 d
ej                        Zy)z;A command that generates all DevSite and manpage documents.    )absolute_import)division)unicode_literalsN)base)
console_io)render_documentc                   &    e Zd ZdZed        Zd Zy)GenerateHelpDocszBUses gcloud's markdown renderer to render the given markdown file.c                     | j                  dd       | j                  ddt        t        j                  j	                               d       y )Nmd_filezLThe path to a file containing markdown to render, or `-` to read from stdin.)helpz--styletextzThe renderer output format.)defaultchoicesr   )add_argumentsortedr   STYLESkeys)parsers    #lib/surface/meta/render_markdown.pyArgszGenerateHelpDocs.Args!   sR    
!  # --2245*	  ,    c                     t        j                  |j                  d      }t        j                  |      5 }t        j                  |j                  |t        j                         d d d        y # 1 sw Y   y xY w)NF)binary)
r   ReadFromFileOrStdinr   ioStringIOr   RenderDocumentstylesysstdout)selfargsdatafs       r   RunzGenerateHelpDocs.Run-   sL    ))$,,uED	T	a$$TZZCJJ? 
		s   0A00A9N)__name__
__module____qualname____doc__staticmethodr   r&    r   r   r
   r
      s    J	, 	,@r   r
   )r*   
__future__r   r   r   r   r    googlecloudsdk.callioper   googlecloudsdk.core.consoler   &googlecloudsdk.core.document_renderersr   Commandr
   r,   r   r   <module>r2      s5     B &  ' 	 
 ( 2 B@t|| @r   