Adding README.md
This commit is contained in:
parent
19c8a93412
commit
01e426eb5a
1 changed files with 19 additions and 0 deletions
19
README.md
Normal file
19
README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Description
|
||||
I wanted to write a tool in Rust which takes an Image as command line argument and then sends this image to ChatGPT to generate an image description. Once it has received the image description it uploads the image to a WordPress media library as new image. After the upload it will add the image description received via ChatGPT as the ALT text and description of the uploaded image in the WordPress media library.
|
||||
|
||||
The script will take the URL of the Wordpress site, the username and application password for Wordpress as well as the OpenAPI URL, ChatGPT model and OpenAPI API key as configuration parameters from a `.env` file.
|
||||
|
||||
# preparation
|
||||
|
||||
Install Rust on your machine. Copy the `.env.example` to `.env`
|
||||
|
||||
# running
|
||||
|
||||
|
||||
`cargo run -- /path/to/your/image.jpg`
|
||||
|
||||
# compilation
|
||||
|
||||
`cargo build --release`
|
||||
|
||||
will build the binary in `./target/release/image-helper-wordpress`
|
Loading…
Reference in a new issue