From 4916fec74e8fcbba79c88880c99ced217f4a1817 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Fri, 15 May 2020 21:13:19 +0000 Subject: [PATCH] [media-translation] docs: hide cloud shell button for mic sample fixes #3769 --- media-translation/cloud-client/README.rst | 2 -- media-translation/cloud-client/README.rst.in | 3 ++- scripts/readme-gen/templates/README.tmpl.rst | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/media-translation/cloud-client/README.rst b/media-translation/cloud-client/README.rst index 38a742d836e..06f4a7c82fc 100644 --- a/media-translation/cloud-client/README.rst +++ b/media-translation/cloud-client/README.rst @@ -82,8 +82,6 @@ To run this sample: Translate from mic +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -.. image:: https://gstatic.com/cloudssh/images/open-btn.png - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=media-translation/cloud-client/translate_from_mic.py,media-translation/cloud-client/README.rst diff --git a/media-translation/cloud-client/README.rst.in b/media-translation/cloud-client/README.rst.in index 301b91fc3e7..745dbb47df8 100644 --- a/media-translation/cloud-client/README.rst.in +++ b/media-translation/cloud-client/README.rst.in @@ -18,7 +18,8 @@ samples: show_help: true - name: Translate from mic file: translate_from_mic.py + hide_cloudshell_button: true cloud_client_library: true -folder: media-translation/cloud-client \ No newline at end of file +folder: media-translation/cloud-client diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst index 6bdd6538fea..2314d7fc560 100644 --- a/scripts/readme-gen/templates/README.tmpl.rst +++ b/scripts/readme-gen/templates/README.tmpl.rst @@ -34,8 +34,10 @@ Samples {{sample.name}} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +{% if not sample.hide_cloudshell_button %} .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}},{{folder}}/README.rst +{% endif %} {{sample.description}}