Skip to content

Commit f2adc97

Browse files
michaelawyuJon Wayne Parrott
michaelawyu
authored and
Jon Wayne Parrott
committed
Added "Open in Cloud Shell" buttons to README files [(#1254)](GoogleCloudPlatform/python-docs-samples#1254)
1 parent 334ff74 commit f2adc97

File tree

12 files changed

+81
-16
lines changed

12 files changed

+81
-16
lines changed

samples/snippets/crop_hints/README.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/crop_hints/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -58,6 +62,10 @@ Samples
5862
Crop Hints Tutorial
5963
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6064

65+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
66+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/crop_hints/crop_hints.py;vision/cloud-client/crop_hints/README.rst
67+
68+
6169

6270

6371
To run this sample:
@@ -67,17 +75,18 @@ To run this sample:
6775
$ python crop_hints.py
6876
6977
usage: crop_hints.py [-h] image_file mode
70-
78+
7179
positional arguments:
7280
image_file The image you'd like to crop.
7381
mode Set to "crop" or "draw".
74-
82+
7583
optional arguments:
7684
-h, --help show this help message and exit
7785
7886
7987
8088
89+
8190
The client library
8291
-------------------------------------------------------------------------------
8392

samples/snippets/crop_hints/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ samples:
2626
show_help: True
2727

2828
cloud_client_library: true
29+
30+
folder: vision/cloud-client/crop_hints

samples/snippets/detect/README.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/detect/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -58,6 +62,10 @@ Samples
5862
Detect
5963
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6064

65+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
66+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/detect/detect.py;vision/cloud-client/detect/README.rst
67+
68+
6169

6270

6371
To run this sample:
@@ -69,20 +77,20 @@ To run this sample:
6977
usage: detect.py [-h]
7078
{faces,faces-uri,labels,labels-uri,landmarks,landmarks-uri,text,text-uri,logos,logos-uri,safe-search,safe-search-uri,properties,properties-uri,web,web-uri,crophints,crophints-uri,document,document-uri}
7179
...
72-
80+
7381
This application demonstrates how to perform basic operations with the
7482
Google Cloud Vision API.
75-
83+
7684
Example Usage:
7785
python detect.py text ./resources/wakeupcat.jpg
7886
python detect.py labels ./resources/landmark.jpg
7987
python detect.py web ./resources/landmark.jpg
8088
python detect.py web-uri http://wheresgus.com/dog.JPG
8189
python detect.py faces-uri gs://your-bucket/file.jpg
82-
90+
8391
For more information, the documentation at
8492
https://cloud.google.com/vision/docs.
85-
93+
8694
positional arguments:
8795
{faces,faces-uri,labels,labels-uri,landmarks,landmarks-uri,text,text-uri,logos,logos-uri,safe-search,safe-search-uri,properties,properties-uri,web,web-uri,crophints,crophints-uri,document,document-uri}
8896
faces Detects faces in an image.
@@ -115,13 +123,14 @@ To run this sample:
115123
document Detects document features in an image.
116124
document-uri Detects document features in the file located in
117125
Google Cloud Storage.
118-
126+
119127
optional arguments:
120128
-h, --help show this help message and exit
121129
122130
123131
124132
133+
125134
The client library
126135
-------------------------------------------------------------------------------
127136

samples/snippets/detect/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ samples:
2626
show_help: True
2727

2828
cloud_client_library: true
29+
30+
folder: vision/cloud-client/detect

samples/snippets/document_text/README.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/document_text/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -58,6 +62,10 @@ Samples
5862
Document Text tutorial
5963
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6064

65+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
66+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/document_text/doctext.py;vision/cloud-client/document_text/README.rst
67+
68+
6169

6270

6371
To run this sample:
@@ -67,17 +75,18 @@ To run this sample:
6775
$ python doctext.py
6876
6977
usage: doctext.py [-h] [-out_file OUT_FILE] detect_file
70-
78+
7179
positional arguments:
7280
detect_file The image for text detection.
73-
81+
7482
optional arguments:
7583
-h, --help show this help message and exit
7684
-out_file OUT_FILE Optional output file
7785
7886
7987
8088
89+
8190
The client library
8291
-------------------------------------------------------------------------------
8392

samples/snippets/document_text/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ samples:
2626
show_help: True
2727

2828
cloud_client_library: true
29+
30+
folder: vision/cloud-client/document_text

samples/snippets/face_detection/README.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/face_detection/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -59,6 +63,10 @@ Samples
5963
Face detection
6064
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6165

66+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
67+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/face_detection/faces.py;vision/cloud-client/face_detection/README.rst
68+
69+
6270

6371

6472
To run this sample:
@@ -68,12 +76,12 @@ To run this sample:
6876
$ python faces.py
6977
7078
usage: faces.py [-h] [--out OUTPUT] [--max-results MAX_RESULTS] input_image
71-
79+
7280
Detects faces in the given image.
73-
81+
7482
positional arguments:
7583
input_image the image you'd like to detect faces in.
76-
84+
7785
optional arguments:
7886
-h, --help show this help message and exit
7987
--out OUTPUT the name of the output file.
@@ -83,4 +91,5 @@ To run this sample:
8391
8492
8593
94+
8695
.. _Google Cloud SDK: https://cloud.google.com/sdk/

samples/snippets/face_detection/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ samples:
2727
- name: Face detection
2828
file: faces.py
2929
show_help: true
30+
31+
folder: vision/cloud-client/face_detection

samples/snippets/quickstart/README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/quickstart/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -58,6 +62,10 @@ Samples
5862
Quickstart
5963
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6064

65+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
66+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/quickstart/quickstart.py;vision/cloud-client/quickstart/README.rst
67+
68+
6169

6270

6371
To run this sample:

samples/snippets/quickstart/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ samples:
2525
file: quickstart.py
2626

2727
cloud_client_library: true
28+
29+
folder: vision/cloud-client/quickstart

samples/snippets/web/README.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Google Cloud Vision API Python Samples
44
===============================================================================
55

6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/web/README.rst
8+
9+
610
This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
711

812
- See the `migration guide`_ for information about migrating to Python client library v0.25.1.
@@ -58,6 +62,10 @@ Samples
5862
Web
5963
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6064

65+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
66+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/web/web_detect.py;vision/cloud-client/web/README.rst
67+
68+
6169

6270

6371
To run this sample:
@@ -67,24 +75,25 @@ To run this sample:
6775
$ python web_detect.py
6876
6977
usage: web_detect.py [-h] image_url
70-
78+
7179
Demonstrates web detection using the Google Cloud Vision API.
72-
80+
7381
Example usage:
7482
python web_detect.py https://goo.gl/X4qcB6
7583
python web_detect.py ../detect/resources/landmark.jpg
7684
python web_detect.py gs://your-bucket/image.png
77-
85+
7886
positional arguments:
7987
image_url The image to detect, can be web URI, Google Cloud Storage, or
8088
path to local file.
81-
89+
8290
optional arguments:
8391
-h, --help show this help message and exit
8492
8593
8694
8795
96+
8897
The client library
8998
-------------------------------------------------------------------------------
9099

samples/snippets/web/README.rst.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ samples:
2626
show_help: True
2727

2828
cloud_client_library: true
29+
30+
folder: vision/cloud-client/web

0 commit comments

Comments
 (0)