GENER8 — Text Preprocessor
Overview
Program release 8.1.6 dated 9 Dec 2021
Copyright © 2002–2025 by Stan Brown, BrownMath.com
Overview
Program release 8.1.6 dated 9 Dec 2021
Copyright © 2002–2025 by Stan Brown, BrownMath.com
GENER8 is perfect for generating repetitive text in lots of files, or versions of one file. There are special features for generating HTML, but you can use it to generate any kind of text. GENER8 includes a flexible macro processor, conditionals with full logic and arithmetic processing, and links to system calls so that you can extend its abilities. GENER8 runs on the command line, using the free GNU AWK program. GNU AWK, and therefore GENER8, can run on many operating systems, including Windows and Linux.
Full documentation is in the GENER8 Scripting Manual.
Download the program and documentation as a 69 KB ZIP file. After downloading, unzip the file in any convenient directory and read the 0readme.1st file.
Need an unzip program? I use and recommend 7-Zip (freeware, open source) for Windows. It also includes a command-line version.
Installation instructions are here.
There is no charge for the program. If you try it and find that it meets your needs, please make a donation, to thank the program author and to help with the cost of web hosting.
GENER8 was formerly shareware, but is now distributed as freeware. All features of the former registered version are present in the freeware version.
If you find that GENER8 meets your needs, please make a donation to reward the program author and also support hosting fees on the Web.
Although I am not aware of any bugs in GENER8, it is offered without warranty. Nevertheless, if you do find a bug, please report it.
I disclaim any ownership or royalty in any output files that you produce by running GENER8.
%#; when used in
a macro definition it stands for the number of arguments actually
supplied when the macro is called.#include-always directive, for use with an include file that
may contain #elif, #else, or
#endif directives.
In the manual: Added a method of preserving spaces at the beginning or end of a macro definition.
logo=no option.#commentregexp directive,
to let you change the comment marker from the default
<!-- ignore -->.#include ! directive to
#include!,
though the old form is still allowed.In the manual:
DATE macro converts the system date or any other
dates to desired formats.FILESIZE macro retrieves the size of a given file in
bytes, KB, MB, or GB.FILEDATE macro now works in Windows XP or any later
Windows, with no more need for a shell like TCCLE, and it no longer
requires the separate mktime.awk program.FILEDATE and DATE accept dates in
year-month-day, day-month-year, and month-day-year format for
conversion, and you register the system date format by using the
DATE_SYSFORMAT macro.FILEDATE and DATE convert three-letter
months Jun, Jul, and Sep to four-letter June, July, and Sept
following some style guides. However, you can alter this behavior by
using the DATE_MONTHS4 macro.In the manual: Corrected a misstatement about the ARITH macro:
%d and %i
truncate to an integer rather than
rounding. Warned about environment
variables not in upper case. Numerous small edits for clarity.
EXISTS macro is no
longer dependent on the operating system, and it’s much faster
too.gensub( ).TOCMIN and TOCMAX
macros. Table-of-contents processing is now available only in the
registered version of GENER8.
TOCB macro does its processing.
#info directive.TOCF macro.
#tocif directive and #tocinsertli directive.
REGPRE macro
and REGSET macro.
TOCB macro.
The tocmin and
tocmax options are used in the implementation and not
intended for use by users..IIFDEF macro.macroArgCountCheck
function.IIF macro.EXISTS macro.
Added the milopt and custom2
date formats to the
FILEDATE macro.
DEFINED macro.LOWER macro and UPPER macro.#macrosep directive and
#macrosepregexp directive, letting me cross off the problem
of spaces in macro arguments and stop worrying about reflowed text generating
macro errors.#includepath directive and
the picky argument for the #picky directive.GDEL macro.ENV macro.ARITH macro: a wider
range of operators is now allowed, and the usual rules of precedence
are followed; for example 2+3*4 is now 14 instead of 20.#if directive and
#elif directive now
expand macro calls, and use identical expression syntax to the
the ARITH macro.INCLUDEFILE macro.picky option and the
#picky directive.
&& and || operators to the
ARITH macro.GSUB macro.Updates and new info: https://BrownMath.com/utils/