Changeset 36920
- Timestamp:
- 2022-11-26T10:54:31+13:00 (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/structured-image/trunk/README.txt
r36247 r36920 1 2 #--- 3 # Setup 4 #--- 5 6 Assuming you have been through setting up: 7 8 cd ext-cli/ 9 ./get-selfcontained-python3.sh 10 11 Then to setup this extension then all you need to do is: 12 13 pip install --upgrade google-cloud-vision 14 15 To enable the Google Vision API, set up a key etc, see: 16 17 https://cloud.google.com/vision/docs/setup 18 19 20 When you create a key, your browsesr downloads a JSON version of the key. 21 22 23 #--- 24 # Using the Extension 25 #--- 26 27 The extension provides the GoogleVisionImagePlugin, for use in collections. 28 29 30 Small workaround needed if checked out in the GS3 extension area: 31 32 export GSDL3EXTS=$GSDL3EXTS:structured-image 33 34 35 Example use of the plugin: 36 37 <plugin name="GoogleVisionImagePlugin"> 38 <option name="-enable_document_ocr"/> 39 <option name="-enable_image_labelling"/> 40 </plugin> 41 42 The plugin currently has a hard-wired filename for the Google 43 service key. This need's to be in the collection's 'etc' 44 directory as follows: 45 46 etc/my-google-service-account-key.json 47 48 49 For the 'atea-storage' Google Cloud Project, for example, a redacted version of 50 the JSON key file looks like: 51 52 { 53 "type": "service_account", 54 "project_id": "atea-storage", 55 "private_key_id": "7bc843de4257da515193eaa5b60468fcab5b3948", 56 "private_key": "-----BEGIN PRIVATE KEY-----\n???????.........??????=\n-----END PRIVATE KEY-----\n", 57 "client_email": "[email protected]", 58 "client_id": "123???...????", 59 "auth_uri": "https://accounts.google.com/o/oauth2/auth", 60 "token_uri": "https://oauth2.googleapis.com/token", 61 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", 62 "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account%40atea-storage.iam.gserviceaccount.com" 63 } 64 65 66 67 ========= 68 69 Deprecated 70 1 71 #==== 2 72 # Getting the extension
Note:
See TracChangeset
for help on using the changeset viewer.