#svg #hex #symbols #rune #numbers #representation #birkana

bin+lib rust-birkana

Creates Birkana rune symbols SVG representation of given hexadecimal number

7 releases (4 stable)

1.1.2 Feb 25, 2019
1.1.1 Jan 20, 2017
1.0.0 Dec 15, 2016
0.1.2 Oct 28, 2016

#4 in #rune

BSD-3-Clause

9KB
132 lines

rust-birkana

Crates.io

Birkana SVG generator.

Recently I read this awesome article about representing hexadecimal numbers using runic system. So I created this little program that takes hexadecimal string on stdin and spits out SVG data on stdout. The code is not that nice, I just wanted a working version.

Download:

You can download binary versions for most common platforms from releases section.

Build:

Since cross-compilation is not in very much working state right now, you'll have to build the binary yourselves.

Steps:

  • install rust.
git clone https://github.com/lunemec/rust-birkana
cd rust-birkana
cargo build --release
mv target/release/rust-birkana .

Now you should be able use the program as described in usage section.

Usage:

echo "0123456789abcdef" | rust-birkana > target.svg

This results in this kind of SVG image:

This is a image of my name encoded in UTF-8 and represented as HEX:

You can now use this crate as a module:

In your Cargo.toml add:

[dependencies]
rust-birkana = "1.1"

And use it like this:

extern crate rust_birkana;

use rust_birkana::document_from_string;


let document = document_from_string(hex_string);
let svg_string = document.to_string();

Dependencies

~82KB