NIGHT ----- Version 1.4 2/19/2021 http://www.centaur.pw ABOUT ----- Night interpreter manipulates console text color and style codes from a file or from the command line. Can interpret standalone executable scripts. TABLE OF CONTENTS ----------------- 1. Compiling & Installation 2. Usage 3. Codes 4. Examples 1. COMPILING & INSTALLATION --------------------------- To build the 'night' binary: $ make To move the 'night' binary to /usr/bin and copy the manual page file 'night.7.gz' to /usr/share/man/man7: $ make install To remove the object files generated by make: $ make clean To delete the installed binary and manual: $ make uninstall 2. USAGE -------- A standalone Night script begins with #!/usr/bin/night as the first line. All lines after this are interpreted, and an extra line should be appended to the file to ensure it is fully processed. Night scripts must have execute permissions. When called on the command line, Night can process either a provided file or string. $ night file Interprets Night codes in the provided file, outputting to standard output. Returns an error message and empty string if file was not found or syntax error in command line. $ night -s 'text' Interprets Night codes in the provided string, outputting to standard output. Returns an empty string if syntax error in command line. $ night -h Displays command usage and color code table. 3. CODES -------- Night codes are case-sensitive and always begin with ~. Color Code ----- ---- black ~BLAK red ~REDX green ~GREE yellow ~YELL blue ~BLUE purple ~PURP cyan ~CYAN white ~WHIT bold black ~BLD~BLAK bold red ~BLD~REDX bold green ~BLD~GREE bold yellow ~BLD~YELL bold blue ~BLD~BLUE bold purple ~BLD~PURP bold cyan ~BLD~CYAN bold white ~BLD~WHIT bold ~BLD underline ~LIN clear ~CLR cursor ~CUR reverse ~REV reset ~RES Codes may be used in any order and quantity. 4. EXAMPLES ----------- The 'reset' code marks the end of all color and effect codes before it. Use ~RES to close a string: ~BLD~LIN~CYANNight~RES The color codes are used to set basic colors: ~BLUEblue text~RES The 'bold' code bolds or brightens color; it can be used before any or no color codes: ~BLD~GREEgreen text~RES The 'underline' code underlines text: ~LINunderlined text~RES The 'clear' code clears the screen of text: ~CLRempty screen The 'cursor' code sets the cursor position to the upper left corner of the screen. This is most useful when used with ~CLR: ~CLR~WHIT~CURclear screen~RES The 'reverse' code sets the current text color to the background color and the background color to the text color: ~REDX~REVblack on red text~RES