initials-revamped

Crates.ioinitials-revamped
lib.rsinitials-revamped
version0.1.2
sourcesrc
created_at2022-12-15 23:18:20.971108
updated_at2022-12-15 23:25:48.482226
descriptioninitials avatar for rust
homepagehttps://github.com/ygormartins/initials-revamped.rs
repositoryhttps://github.com/ygormartins/initials-revamped.rs.git
max_upload_size
id738357
size230,856
Ygor Martins (ygormartins)

documentation

https://github.com/ygormartins/initials-revamped.rs

README

initials-revamped

initials-revamped is a fork from the initials crate that allows generating customizable avatars with the initial characters from arbitrary name values.

Fork To-Do List

  • Change lib path from initials to initials-revamped
  • Submit crate to crates.io
  • Use a more readable, fitting font (Roboto)
  • Add support for directly using font bytes content (as opposed to paths)
  • Update documention to include new features & change outdated info
  • Better integration with the image crate
  • Add a write_to method to write raw bytes data to an array

Setup and Usage

In your Cargo.toml, add the following:

[dependencies]
initials_revamped = "*"
use initials_crate::{AvatarBuilder, AvatarResult};

fn avatar() -> AvatarResult {
    AvatarBuilder::new("Avatar")
        .with_font_color("#000000")?
        .with_background_color("#FAFAFA")?
        .with_width(200)?
        .with_height(200)
}

fn main() {
    let avatar = avatar().unwrap();
    let image = avatar.draw();
    // use the generated image
}

See Documentation (original docs - still haven't written my own)

Local Server

Doc

License

MIT

Credits

All the credit goes to Onur Sönmez, the original creator of this awesome lib.

Commit count: 36

cargo fmt