CENTAUR NIGHT
-------------

Version 2.3
1/30/2026
https://www.centaur.pw
Jon Siragusa <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.

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.1'.

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.1.gz' to /usr/share/man/man1:

	$ 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 -a | --remove-ansi <file> ...
       night2 -n | --remove-night <file> ...
       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.
