#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

#503 in Text processing

Download history 34/week @ 2024-03-11 29/week @ 2024-03-18 42/week @ 2024-04-01 62/week @ 2024-04-08 67/week @ 2024-04-15 25/week @ 2024-04-22 17/week @ 2024-04-29 14/week @ 2024-05-06 16/week @ 2024-05-13 16/week @ 2024-05-20 30/week @ 2024-05-27 17/week @ 2024-06-03 11/week @ 2024-06-10 16/week @ 2024-06-17 22/week @ 2024-06-24

69 downloads per month
Used in leetcode-cli-rs

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