source: gs3-extensions/structured-image/trunk/README.txt@ 37140

Last change on this file since 37140 was 37140, checked in by davidb, 16 months ago

Updated to direct a developer to the packages/README.txt file

File size: 1.7 KB
Line 
1
2#---
3# Setup
4#---
5
6Assuming you have been through setting up:
7
8 cd ext-cli/
9 ./get-selfcontained-python3.sh
10
11Then to setup this extension then all you need to do is:
12
13 pip install --upgrade google-cloud-vision
14
15To enable the Google Vision API, set up a key etc, see:
16
17 https://cloud.google.com/vision/docs/setup
18
19
20When you create a key, your browsesr downloads a JSON version of the key.
21
22
23Also check:
24
25 packages/README.txt
26
27and
28 src/README.txt
29
30and follow the instructions.
31
32
33#---
34# Using the Extension
35#---
36
37The extension provides the GoogleVisionImagePlugin, for use in collections.
38
39Example use of the plugin:
40
41 <plugin name="GoogleVisionImagePlugin">
42 <option name="-enable_document_ocr"/>
43 <option name="-enable_image_labelling"/>
44 </plugin>
45
46The plugin currently has a hard-wired filename for the Google
47service key. This need's to be in the collection's 'etc'
48directory as follows:
49
50 etc/my-google-service-account-key.json
51
52
53For the 'atea-storage' Google Cloud Project, for example, a redacted version of
54the JSON key file looks like:
55
56{
57 "type": "service_account",
58 "project_id": "atea-storage",
59 "private_key_id": "7bc843de4257da515193eaa5b60468fcab5b3948",
60 "private_key": "-----BEGIN PRIVATE KEY-----\n???????.........??????=\n-----END PRIVATE KEY-----\n",
61 "client_email": "[email protected]",
62 "client_id": "123???...????",
63 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
64 "token_uri": "https://oauth2.googleapis.com/token",
65 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
66 "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account%40atea-storage.iam.gserviceaccount.com"
67}
68
69
Note: See TracBrowser for help on using the repository browser.