#ascii-art #convert-text #add #join

bin+lib text-to-ascii-art

A simple program to convert text to ASCII art

6 releases

0.1.9 Jul 16, 2023
0.1.8 Jul 16, 2023
0.1.4 Jun 28, 2023

#431 in Text processing

Download history 3/week @ 2024-02-12 7/week @ 2024-02-19 20/week @ 2024-02-26 18/week @ 2024-03-04 34/week @ 2024-03-11 29/week @ 2024-03-18 11/week @ 2024-03-25

93 downloads per month

MIT license

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

No runtime deps