Home
Software
Utilities
About
Reader (README)
https://centaur.pw/software/night/README
[
Direct Link
]
CENTAUR NIGHT ------------- Version 2.2 7/27/2025 https://www.centaur.pw <jon@centaur.pw> TABLE OF CONTENTS ----------------- 1. About 2. Compiling & Installation 3. Command Line Usage 1. ABOUT -------- Night converts simplified color codes in a file or string to ANSI codes for styling terminal output. The program accepts file or string input on the command line, but can also be used to process stand-alone Night scripts. Night 2.1 introduced text centering. Night 2.2 introduces many new codes for moving the cursor and box drawing. This version includes many more codes in a more intuitive format than the previous versions, but remains compatible with codes from previous versions of Night, with the exception of the :uncenter: tag, which has been changed to :.center:. Full documentation for this program is contained in the manual file, including a table of codes and numerous usage examples. The manual can be read after installation using 'man night2' or before installation using 'man ./night2.7.gz'. An additional manual has been included which uses Night codes and provides real example output. The file 'night2.nt' can be viewed after installation using 'night2 night2.nt' or after compilation using './night2 night2.nt'. 2. COMPILING & INSTALLATION --------------------------- The installation and manual directory can be configured in the Makefile. There are three compile-time options that can be modified at the top of the 'night2.h' source file. To disable support for old Night (version 1.X) codes, comment out the line: #define SUPPORT_OLD_CODES 1 or change the 1 to 0. To use more simplistic box drawing characters, comment out the line: #define BOX_STYLE 1 or change the 1 to 0. To adjust the maximum number of newlines allowed in a box from the default value (40), change the number on the line: #define MAX_LINES 40 to the desired value. To compile the 'night2' binary: $ make To move the 'night2' binary to /usr/local/bin and copy the manual page file 'night2.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 3. COMMAND LINE USAGE --------------------- Syntax: night2 <file> ... night2 "`cat file`" | "$(cat file)" cat file | night2 night2 -s | --string <string> ... night2 -t | --test night2 -h | --help <file> may be any number of files. <string> may be any number of strings. It is not strictly necessary to enclose the string in quotes; all arguments passed to the program will be concatenated. If the program is called with no arguments, input is read from standard input.