6 releases
0.1.9 | Jul 16, 2023 |
---|---|
0.1.8 | Jul 16, 2023 |
0.1.4 | Jun 28, 2023 |
#431 in Text processing
93 downloads per month
150KB
940 lines
Usage
Provides 2 functions for working with and creating ascii art from simple text.
Convert text and selected symbols into ascii art
fn convert (input: String) -> Result<String, String>
Join 2 ascii art images together (they both need to be rectangle for it to work, add spaces to the end so it's rectangle)
fn join_art (s1: &str, s2: &str) -> String
If you cargo run this crate you can enter input text and it will just print and then exit.
Video example: https://github.com/osmak1234/text-to-ascii-art/assets/91377215/ea937074-fdc6-4c67-839e-15d6854f0bee
Usage in Rust
use text_to_ascii_art::convert;
fn main () {
match convert("Hello in ascii".to_string()) {
Ok(string) => println!("{}", string),
Err(err) => println!("Error: {}", err),
}
}
[dependencies]
text-to-ascii-art="0.1.5"
Road map
- kindof monospace
- full monospace
- add some more special characters
- auto spacing for join art
- better documentation