manifest / integrations / mt-wp-photo-analysis-plugin
MT Photo Analysis archived
WordPress plugin to detect text in images
by Xennis · github.com/mirostruckstop/mt-wp-photo-analysis-plugin · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mirostruckstop/mt-wp-photo-analysis-plugin/archive/refs/heads/master.zipReadme
MT WordPress Photo Analysis Plugin
Setup
Requirements
- The MT Photo Analysis Cloud Function is deployed in a Google Cloud project
-
Create a service account with the required role
gcloud iam service-accounts create mt-website --display-name "mt-website" id="mt-website@${GCP_PROJECT}.iam.gserviceaccount.com" gcloud iam service-accounts add-iam-policy-binding "${id}" \ --member="serviceAccount:${id}" \ --role="roles/pubsub.publisher" -
Create a key for that service account
gcloud iam service-accounts keys create keyfile.json --iam-account="${id}" -
Set the content of the
keyfile.jsonas constantGCP_APPLICATION_KEYin thewp-config.phpfiledefine('GCP_APPLICATION_KEY', '{ "type": "service_account", [...] }'); -
Set the JWT used by the cloud function in the
wp-config.phpfiledefine('GCP_JWT', 'JWT-HERE');
Development
Requirements
- PHP and Composer (dependency manager for PHP) are installed
Steps
- Install the requirements:
composer install
Sync required files
rsync -r --relative *.php src vendor/autoload.php vendor/composer <host>:<wordpress-dir>/wp-content/plugins/mt-wp-photo-analysis/