`boxy` - declarative box-drawing characters

Related tags

Command-line boxy
Overview

boxy - declarative box-drawing characters

Crates.io docs.rs

Box-drawing characters are used extensively in text user interfaces software for drawing lines, boxes, and other shapes. Unicode provides a large assortment of them in the Box Drawing block (U+2500 to U+257F).

Unfortunately it can be quite irritating to construct code points in this range, and generating graphics using box drawing characters can be tedious. This is true even when explicit formulas exist for subsets of the block.

This crate provides the relevant lookup tables and exposes a nice interface for generating characters via the boxy::Char type. For example:

let corner = boxy::Char::upper_left(boxy::Weight::Doubled);
let side = boxy::Char::horizontal(boxy::Weight::Doubled);

let bx = format!(
  "{}{}{}\n{}{}{}",
  corner, side, corner.rotate_cw(1),
  corner.rotate_cw(3), side, corner.rotate_cw(2),
);

assert_eq!(bx, "
╔═╗
╚═╝
".trim());

This crate is no_std and will never panic, making it ideal for your a e s t h e t i c kernel panic messages.

You might also like...
Split text into semantic chunks, up to a desired chunk size. Supports calculating length by characters and tokens

Large language models (LLMs) can be used for many tasks, but often have a limited context size that can be smaller than documents you might want to use. To use documents of larger length, you often have to split your text into chunks to fit within this context size.

A fantastic crate for fmting numbers using the appropriate unciode characters.

fmtastic ✨ A fantastic crate for fmting numbers using the appropriate unicode characters via the Display trait. ✨ Supports vulgar fractions, super- an

Perspective projection of a spinning cube, using just ASCII characters.

Spinning Cube Perspective projection of a spinning cube, using just ASCII characters. spinning_cube.mp4 Instalation cargo install spinning_cube Basic

🦀 Stupid simple presentation of the number of words, characters and lines on your clipboard.

clipcount: Counting words from the clipboard content Why does this exist? Do you find yourself often needing to count the number of words in a piece o

Keybinder to type diacrytical characters without needing to hack the layout itself. Supports bindings to the left Alt + letter

Ďíáǩříťíǩád I just thought that it's a shame the word diakritika does not have any diacritics in it. Key points diakritika is a simple Windows daemon

Black-box integration tests for your REST API using the Rust and its test framework

restest Black-box integration test for REST APIs in Rust. This crate provides the [assert_api] macro that allows to declaratively test, given a certai

Benson Box built on Substrate for a world UNcorporated.

Benson Box Benson Box built on Substrate. For getting started and technical guides, please refer to the Benson Wiki. Contributing All PRs are welcome!

Boxxy puts bad Linux applications in a box with only their files.

boxxy is a tool for boxing up misbehaving Linux applications and forcing them to put their files and directories in the right place, without symlinks!

Rudi - an out-of-the-box dependency injection framework for Rust.

Rudi Rudi - an out-of-the-box dependency injection framework for Rust. use rudi::{Context, Singleton, Transient}; // Register `fn(cx) - A { A }` as

Owner
Miguel Young
AKA mcyoung
Miguel Young
A library for building declarative text-based user interfaces

Intuitive docs.rs Documentation Intuitive is a component-based library for creating text-based user interfaces (TUIs) easily. It is heavily inspired b

Enrico Borba 205 Dec 29, 2022
A library that creates a terminal-like window with feature-packed drawing of text and easy input handling. MIRROR.

BearLibTerminal provides a pseudoterminal window with a grid of character cells and a simple yet powerful API for flexible textual output and uncompli

Tommy Ettinger 43 Oct 31, 2022
a rust crate for drawing fancy pie charts in the terminal

piechart piechart is a rust crate for drawing fancy pie charts in the terminal. Example usage: use piechart::{Chart, Color, Data}; fn main() { le

Jakob Hellermann 35 Dec 30, 2022
Rusty fast cross-platform 2D drawing library

Bly Rusty fast cross-platform 2D graphics library Concept Easy to use Bly is easy to use and yet can be called from various windowing libraries using

null 4 Feb 27, 2023
Small CLI for escaping and unescaping characters in strings

?? esc Small CLI for escaping characters in strings. Install cargo install esc Usage cat LICENSE-MIT | esc escape | pbcopy pbpaste | esc unescape | pb

Seth 1 Nov 26, 2021
Tiny Rust library to draw pretty line graphs using ascii characters.

rasciigraph Tiny Rust library to draw pretty line graphs using ascii characters. Usage Add this to your Cargo.toml [dependencies] rasciigraph = "0.1.1

Orhan Balci 54 Jan 6, 2023
Alexander Mongus is a state-of-the-art filter to sneak amogus characters in pictures

A. Mongus Go to: http://www.lortex.org/amogu/ ??? This is a client-side, Webassembly-based filter to hide amongus characters in your images. Example:

Lucas Pluvinage 3 Apr 16, 2022
omekasy is a command line application that converts alphanumeric characters in your input to various styles defined in Unicode.

omekasy is a command line application that converts alphanumeric characters in your input to various styles defined in Unicode. omekasy means "dress up" in Japanese.

null 105 Nov 16, 2022
A tool to convert old and outdated "characters" into the superior Rustcii-Encoding.

rustcii A tool to convert old and outdated "characters" into the superior Rustcii-Encoding. Speak your mind. Blazingly ( ?? ) fast ( ?? ). Github | cr

null 8 Nov 16, 2022
A terminal clock that uses 7-segment display characters

Seven-segment clock (7clock) 7clock.3.mp4 This is a clock for terminals that uses the Unicode seven-segment display characters added in Unicode 13.0.

Wesley Moore 4 Nov 11, 2022