From 30a0e920042a7e92307d87c3708e1677188ce7d8 Mon Sep 17 00:00:00 2001 From: Maximilian Pohl Date: Mon, 30 Oct 2023 10:23:23 +0100 Subject: [PATCH] Add keywords and readme --- Cargo.toml | 4 ++-- README.md | 24 ++++++++++++++++++++++++ src/lib.rs | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/Cargo.toml b/Cargo.toml index e220fc1..3b6c4b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,14 +2,14 @@ name = "image_thumbs" version = "0.1.0" edition = "2021" +repository = "https://github.com/tweedegolf/image-thumbs" +keywords = ["GCS", "image", "thumbnails"] license = "MIT OR Apache-2.0" description = "Simple to use crate to create thumbnails and store them in a object store like Google Cloud Storage" [[example]] name = "basic" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] object_store = { version = "0.7" , features = ["gcp"]} image = { version = "0.24.7", default-features = false, features = ["png", "jpeg"] } diff --git a/README.md b/README.md new file mode 100644 index 0000000..46ed0ed --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Image Thumbs + +Easy-to-use library to create image thumbnails from images existing on some (cloud) object storage or from disk. + +Currently implemented is a connection to Google Cloud Storage, but it can be easily extended to other providers. + +# How to use + + ```rust +#[tokio::main] +async fn main() { + let thumbs = image_thumbs::ImageThumbs::new("examples/image_thumbs") + .await + .unwrap(); + thumbs + .create_thumbs("penguin.jpg", "/thumbs", false) + .await + .unwrap(); + thumbs + .create_thumbs("penguin.png", "/thumbs", false) + .await + .unwrap(); +} + ``` \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index b9fed36..c0173a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -//! Easy to use library to create image thumbnails from images existing on some (cloud) object +//! Easy-to-use library to create image thumbnails from images existing on some (cloud) object //! storage or from disk. //! //! Currently implemented is a connection to Google Cloud Storage, but it can be easily extended to