|
12 | 12 | // See the License for the specific language governing permissions and
|
13 | 13 | // limitations under the License.
|
14 | 14 |
|
15 |
| -/* eslint-disable */ |
16 |
| - |
17 | 15 | 'use strict';
|
18 | 16 |
|
19 | 17 | async function detectHandwritingOCR(fileName) {
|
@@ -74,40 +72,40 @@ async function detectHandwritingGCS(uri) {
|
74 | 72 | // [END vision_handwritten_ocr_gcs_beta]
|
75 | 73 | }
|
76 | 74 |
|
77 |
| -require(`yargs`) |
| 75 | +require('yargs') |
78 | 76 | .demand(1)
|
79 | 77 | .command(
|
80 |
| - `detectHandwriting`, |
81 |
| - `Detects handwriting in a local image file.`, |
| 78 | + 'detectHandwriting', |
| 79 | + 'Detects handwriting in a local image file.', |
82 | 80 | {},
|
83 | 81 | opts => detectHandwritingOCR(opts.handwritingSample)
|
84 | 82 | )
|
85 | 83 | .command(
|
86 |
| - `detectHandwritingGCS`, |
87 |
| - `Detects handwriting from Google Cloud Storage Bucket.`, |
| 84 | + 'detectHandwritingGCS', |
| 85 | + 'Detects handwriting from Google Cloud Storage Bucket.', |
88 | 86 | {},
|
89 | 87 | opts => detectHandwritingGCS(opts.handwritingSample)
|
90 | 88 | )
|
91 | 89 | .options({
|
92 | 90 | handwritingSample: {
|
93 | 91 | alias: 'h',
|
94 |
| - default: `./resources/handwritten.jpg`, |
| 92 | + default: './resources/handwritten.jpg', |
95 | 93 | global: true,
|
96 | 94 | requiresArg: true,
|
97 | 95 | type: 'string',
|
98 | 96 | },
|
99 | 97 | handwritingGcsUri: {
|
100 | 98 | alias: 'u',
|
101 |
| - default: `gs://cloud-samples-data/vision/handwritten.jpg`, |
| 99 | + default: 'gs://cloud-samples-data/vision/handwritten.jpg', |
102 | 100 | global: true,
|
103 | 101 | requiresArg: true,
|
104 | 102 | type: 'string',
|
105 | 103 | },
|
106 | 104 | })
|
107 |
| - .example(`node $0 detectHandwriting ./resources/handwritten.jpg`) |
108 |
| - .example(`node $0 detectHandwritingGCS gs://my-bucket/image.jpg`) |
| 105 | + .example('node $0 detectHandwriting ./resources/handwritten.jpg') |
| 106 | + .example('node $0 detectHandwritingGCS gs://my-bucket/image.jpg') |
109 | 107 | .wrap(120)
|
110 | 108 | .recommendCommands()
|
111 |
| - .epilogue(`For more information, see https://cloud.google.com/vision/docs`) |
| 109 | + .epilogue('For more information, see https://cloud.google.com/vision/docs') |
112 | 110 | .help()
|
113 | 111 | .strict().argv;
|
0 commit comments