USER COMMANDS JOY(1) NAME joyc - joke's very own HTML compiler SYNOPSIS joyc [ -a, --author authorname ] [ -d, --debug ] [ -D, --define [ macro=defn ] ] [ -f, --force ] [ -I, --include directory ] [ -l, --lint ] [ -n, --no-formatting ] [ -p, --package filename ] [ -P, --pragma ] [ -s, --suffix exten- sion ] [ -U, --undef [ macro=defn ] ] [ -v, --version release ] [ -V, --verbose ] file(s)s ... DESCRIPTION joyc is joke's very own HTML compiler written in a mindbog- glingly outdated language called shell. The script converts a file written in JOY (cf section on the JOY language below) to a syntactically correct HTML file. Optionally you can even check the hyperlinks in the JOY source for consistency. joyc's output is consistent with the W3 Consortium's HTML 3.2 document type definition: -//W3C//DTD HTML 3.2//EN and is minimal, in the sense, that the ASCII representation of the file is the smallest possible one, with respect to a certain linelength. This is simply because some WWW clients break when trying to handle very long lines, and quite natu- rally, shorter files load faster. Even though the main lot of a HTML page is not the HTML file itself but it's graph- ics. Well, we cannot do much about the graphics, but we can shrink the HTML source. If any of the input file(s) is a directory, joyc compiles HTML from all JOY sources found, while recursively descend- ing into directory. By default, only sources newer than their HTML compilations are converted. This can be overwrit- ten with the -f, --force option. OPTIONS -a, --author authorname Set the __JOY_AUTHOR__ internal variable (cf the sec- tion on JOY variable expansion), i.e., all occurances of __JOY_AUTHOR__ are replace with authorname. -d, --debug Turn debugging mode on, i.e., since joyc is a shell script, set -x is turned on. -f, --force Force compilation of HTML from any JOY source found. By default, joyc tries to be smart about which files to compile, and checks if a JOY file is newer than its Version 0.95a Last change: 5 May 1996 1 USER COMMANDS JOY(1) HTML compilation. -D, --define macro Define macro macro with the string 1 as its definition. -D, --define macro=defn Define macro macro as defn. All instances of -D on the command line are processed before any -U options. -U, --undefine macro Undefine macro macro. -U options are evaluated after all -D options. -I, --include directory Append the directory to the list of directories searched for include files. -l, --lint Run the result of the m4 preprocessor call through weblint(1) to check HTML syntax and hyperlink integrity. -n, --no-formatting Do not run the result of the m4 preprocessor call through fmt(1) to reformat the output. -p, --pack filename Create tarfile filename-release.tar.gz from the current directory. The number of release is set with the -v, --version flag. -P, --pragma Insert a Pragma: no-cache header into the HTML code generated. This page is then neither cached by proxy caches or local disk caches of browsers. -s, --suffix extension The default suffix for JOY sources is .joy (and used to be .foo); so this option may be used for backward com- patibility. And is bound to dissapear in future releases. -v, --version release Set the __JOY_VERSION__ internal variable (cf the sec- tion on JOY variable expansion), i.e., all occurances of __JOY_VERSION__ are replace with release. After creation of the HTML file, it is checked in using the GNU RCS revision control system's ci(1) command. Caveat: release must be a valid revision number in accordance to rcs(1) specifications. All else will surely cause an error from ci(1). (Don't use this flag, if you don't know RCS. Do not use UNIX either! Version 0.95a Last change: 5 May 1996 2 USER COMMANDS JOY(1) By default, a revision number of 1.1 is assumed.) -V, --verbose Turn on messages that tell you what's going on. Warn- ings are also enabled with this flag. Refer to the BUGS section below on philosophical implica- tions of OPTIONS. ENVIRONMENT joyc is not a monolithic block, it uses more than a dozen "standard" unixoid systems utilities. We therefore recommend to use the freely available GNU versions of these tools. Notably, the GNU file utilities, the GNU text utilities, the GNU shell utilities, GNU RCS, GNU tar, GNU grep, GNU sed, and GNU m4. Or simply use Linux, or any of the free BSD implementations. FILES joyc reads and writes several files, I have no idea which. Usually files ending in .joy are converted to a file of the same name ending in .html. Some magic happens during this conversion. Files named index.joy undergo special handling insofar, as after conversion, a symbolic link named Wel- come.html is created that points to index.html. Output of joyc can thus be used in both worlds, CERN and NCSA. JOY JOY resembles HTML plus additional markups. The additonal markups are written in m4; (early versions of JOY used the GNU C pre-processor for macro expansion, but m4 is clearly the better choice.) Macro expansion JOY_BEGIN() JOY_END() Variable expansion You may use any of the following JOY variables in your JOY sources. __JOY_AUTHOR__ Expands to the author of the file. Set this with the -a, --author flag. Version 0.95a Last change: 5 May 1996 3 USER COMMANDS JOY(1) __JOY_DATE__ Expands to the current date during HTML compilation. (Format is: date "+%d %h %y".) __JOY_FILES__ The total number of files in the directory tree, where the JOY source resides. __JOY_TIME__ Expands to the current time during HTML compilation. (Format is: date "+%H:%M %Z".) __JOY_VERSION__ The version number of the JOY source file. Also used for revision control. Set this with the -v, --version flag. __JOY_XREFS__ The total number of unique href= hyperlinks in all JOY sources of the directory tree, where the current source resides. Many more fun things on JOY missing here... BUGS None that I know of. May be completely rewritten. NOTE Rumour has it, that soon after release of GNU joyc, there shall be a version called N'joyc that would be marketed by a compnay that has a big, upper-case N in their logo. This shall not be the case. SEE ALSO basename(1), cat(1), cc(1), ci(1), co(1), date(1), echo(1), expand(1), find(1), fmt(1), gcc(1), getopts(1), grep(1), gtar(1), ln(1), make(1), mv(1), perl(1) rcs(1), rm(1), sed(1), sh(1), sort(1), tee(1), tr(1), uniq(1), wc(1), weblint(1) AVAILABILITY http://research.Germany.EU.net:8080/~magpie/joy/joy.tar.gz AUTHOR Copyright (c) 1995, 1996 by Joerg Heitkoetter Send bugs, comments, and job offers to joke@Germany.EU.net Version 0.95a Last change: 5 May 1996 4 USER COMMANDS JOY(1) KOAN "The only JOY in the world is to begin." (Cesare Pavese) Version 0.95a Last change: 5 May 1996 5