3 y\@s ddlZddlmZddZdS)N)ServiceDocumenterc Cs|tjj|dd}tjj|s&tj|xP|jD]D}t||j}tjj||d}t|d}|j |WdQRXq0WdS)aGenerates the reference documentation for botocore This will go through every available AWS service and output ReSTructured text files documenting each service. :param root_dir: The directory to write the reference files to. Each service's reference documentation is loacated at root_dir/reference/services/service-name.rst :param session: The boto3 session referenceZservicesz.rstwbN) ospathjoinexistsmakedirsZget_available_servicesrZdocument_serviceopenwrite)root_dirsessionZservices_doc_pathZ service_nameZdocsZservice_doc_pathfr6/tmp/pip-install-19gh560x/boto3/boto3/docs/__init__.py generate_docss     r)rZboto3.docs.servicerrrrrr s