NAME

ANSI Encode

SYNOPSIS

A markup language to generate basic ANSI text. A terminal that supports UTF-8 is highly recommended for graphics characters.

USAGE

ansi_encode.pl [options] [file/search]

OPTIONS

Using no options expects a file name.

--version or -v

Shows name, version information and brief licensing information.

--help or -h

Simple usage and options documentation

--tokens or -y

Shows the most used tokens available. A token is encapsulated within [% and %] (with at lease one space on each side)

--rawtokens or r

Raw dump of useable tokens.

--symbols or -s [search]

Similar to "tokens", but instead shows special symbol character token names.

You may also add a search string to shorten the list.

IT IS HIGHLY SUGGESTED YOU USE A SEARCH STRING. There are a lot of Unicode characters. Each character has its own token.

--unicode or -u [search]

Similar to "tokens", but instead shows special symbol characters by unicode.

You may also add a search string to shorten the list.

IT IS HIGHLY SUGGESTED YOU USE A SEARCH STRING.

--dump or -d [search]

Does a raw dump of the symbols.

    [% RED %]This is written in red[% RESET %]

    RESET changes output text to normal.

TOKENS

GENERAL

[% RETURN %]

ASCII RETURN (13)

[% LINEFEED %]

ASCII LINEFEED (10)

[% NEWLINE %]

RETURN + LINEFEED (13 + 10)

[% CLS %]

Places cursor at top left, screen cleared

[% CLEAR %]

Clear screen only, cursor remains where it was

[% CLEAR LINE %]

Clear to the end of line from current cursor position

[% CLEAR DOWN %]

Clear down from current cursor position

[% CLEAR UP %]

Clear up from current cursor position

[% RESET %]

Reset all colors and attributes to their defaults

CURSOR

[% HOME %]

Moves the cursor to the location 1,1 (Top left of screen)

[% UP %] (Non-destructive)

Moves cursor up one step

[% DOWN %] (Non-destructive)

Moves cursor down one step

[% RIGHT %] (Non-destructive)

Moves cursor right one step

[% LEFT %] (Non-destructive)

Moves cursor left one step

[% SAVE %]

Save current cursor position (overwrites previous save, only one at a time)

[% RESTORE %]

Place cursor at saved position

[% BOLD %]

Bold text (not all terminals support this)

[% FAINT %]

Faded text (not all terminals support this)

[% ITALIC %]

Italicized text (not all terminals support this)

[% UNDERLINE %]

Underlined text

Slow cursor blink

Rapid cursor blink (Some terminals just do a slow blink)

[% LOCATE column,row %]

Set cursor position

ATTRIBUTES

[% INVERT %]

Invert text (flip background and foreground attributes)

[% REVERSE %]

Invert text (flip background and foreground attributes)

[% CROSSED OUT %]

Crossed out. Text with a line through the middle.

{% DEFAULT FONT %]

Default font. If the font was changed, then restore to the default font.

FRAMES

[% BOX color,x,y,width,height,type %] text here [% ENDBOX %]

Draw a frame around text. There are many types to choose from.

COLORS

[% NORMAL %]

Sets colors to default

FOREGROUND

There are many more foreground colors available than the ones below. However, the ones below should work on any color terminal. Other colors may requite 256 and 16 million color support. Most Linux X-Windows and Wayland terminal software should support the extra colors. Some Windows terminal software should have "Term256" features. You can used the "-t" option for all of the color tokens available or use the "RGB" token for access to 16 million colors.

BLACK = Black =item RED = Red =item PINK = Hot pink =item ORANGE = Orange =item NAVY = Deep blue =item GREEN = Green =item YELLOW = Yellow =item BLUE = Blue =item MAGENTA = Magenta =item CYAN = Cyan =item WHITE = White =item DEFAULT = Default foreground color =item BRIGHT BLACK = Bright black (dim grey) =item BRIGHT RED = Bright red =item BRIGHT GREEN = Lime =item BRIGHT YELLOW = Bright Yellow =item BRIGHT BLUE = Bright blue =item BRIGHT MAGENTA = Bright magenta =item BRIGHT CYAN = Bright cyan =item BRIGHT WHITE = Bright white

BACKGROUND

There are many more background colors available than the ones below. However, the ones below should work on any color terminal. Other colors may requite 256 and 16 million color support. Most Linux X-Windows and Wayland terminal software should support the extra colors. Some Windows terminal software should have "Term256" features. You can used the "-t" option for all of the color tokens available or use the "B_RGB" token for access to 16 million colors.

B_BLACK = Black =item B_RED = Red =item B_GREEN = Green =item B_YELLOW = Yellow =item B_BLUE = Blue =item B_MAGENTA = Magenta =item B_CYAN = Cyan =item B_WHITE = White =item B_DEFAULT = Default background color =item B_PINK = Hot pink =item B_ORANGE = Orange =item B_NAVY = Deep blue =item BRIGHT B_BLACK = Bright black (grey) =item BRIGHT B_RED = Bright red =item BRIGHT B_GREEN = Lime =item BRIGHT B_YELLOW = Bright yellow =item BRIGHT B_BLUE = Bright blue =item BRIGHT B_MAGENTA = Bright magenta =item BRIGHT B_CYAN = Bright cyan =item BRIGHT B_WHITE = Bright white

HORIZONAL RULES

Makes a solid blank line, the full width of the screen with the selected color

For example, for a color of blue, use the following

[% HORIZONTAL RULE BLUE %]
HORIZONTAL RULE [color] = A solid line of [color] background

AUTHOR & COPYRIGHT

Richard Kelsch

Copyright (C) 2025 Richard Kelsch
All Rights Reserved
Perl Artistic License

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

8 POD Errors

The following errors were encountered while parsing the POD:

Around line 536:

You forgot a '=back' before '=head2'

Around line 538:

'=item' outside of any '=over'

Around line 594:

You forgot a '=back' before '=head2'

Around line 596:

'=item' outside of any '=over'

Around line 612:

You forgot a '=back' before '=head2'

Around line 614:

'=item' outside of any '=over'

Around line 618:

You forgot a '=back' before '=head2'

Around line 620:

'=item' outside of any '=over'