blob: 3ac97dc5f8983e7810f052ed0641d45667a55a1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
------------------------------------=[bbrll]=-----------------------------------
Bash Braille:
Simple bash script for drawing graphics in the terminal, takes as input drawing
commands, and will print either the raw image or the braille version of the
image as an output
begin:
CANVAS or
X then
Y
#makes a XxY canvas filled with ".", which is the character
#interpreted as a blank when converting to braille
LOAD_RAW or
FOOBAR repeat until
END_RAW
#loads the lines FOOBAR into the image buffer
LOAD_POINT or
X then
Y then
C
#loads the character C into position X,Y
PRINT_RAW or
#prints the raw image buffer
PRINT_BRAILLE or
#NOTE: THIS ONLY PRINTS '1' as a filled in dot
#prints the output in braille, this uses only the width of the
#first row so make sure to call CANVAS or something before hand
END
#ends the script
examples are in INPUT and INPUT2
------------------------------------=[fontd]=-----------------------------------
NOTE: When specifiying the font directory, do not leaving a trailing /
Font Display:
prints font in braille characters, useful for limited environments such
as the linux console(although you would need braille support first),
takes as first argument a decimal codepoint (bdf format) and the 2nd a
directory with bdf fonts from which to find the character
------------------------------------=[textd]=-----------------------------------
NOTE: When specifiying the font directory, do not leaving a trailing /
Text Display:
Takes utf-8 input from stdin and displays it vertically with fonts
specified by the first argument
|