Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
ea149857c6 | ||
|
463b19ea27 | ||
|
f80f1fad59 |
2 changed files with 9 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
target/
|
||||
Cargo.lock
|
||||
.env
|
||||
.DS_Store
|
||||
|
|
|
@ -3,6 +3,12 @@ I wanted to write a tool in Rust which takes an Image as command line argument a
|
|||
|
||||
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.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
To use this application you need an account for ChatGPT and generate an access token so you can use the OpenAI API. Instructions can be found at [their documentation site](https://platform.openai.com/docs/quickstart)
|
||||
|
||||
In addition, you should have a WordPress installation with a recent version of WordPress and an application token configured for your user account. This allows programmatic access to your wordpress instance. This can be found under Users -> Profile -> Application Passwords
|
||||
|
||||
# preparation
|
||||
|
||||
Install Rust on your machine. Copy the `.env.example` to `.env`
|
||||
|
@ -27,3 +33,5 @@ Generated description: Aerial view of a circular lake surrounded by dense forest
|
|||
Successfully uploaded image to WordPress with description
|
||||
Image URL: https://example.wordpress.com/wp-content/uploads/2024/11/DJI_0247-scaled.jpg
|
||||
```
|
||||
|
||||
[![asciicast](https://asciinema.mxhdr.net/a/8DVzLQbUuQcAZc897Iz5kR4b5.svg)](https://asciinema.mxhdr.net/a/8DVzLQbUuQcAZc897Iz5kR4b5)
|
||||
|
|
Loading…
Reference in a new issue