#!/usr/bin/env retro This program generates an HTML index and exports (using the `export-as-html.forth` example) the samples to HTML. The files are stored in `/home/crc/public/examples`. # Configuration ~~~ '/home/crc/public/examples/ 'FILE-PATH s:const ~~~ # Variables ~~~ 'FID var ~~~ # Support This word takes a string and provides a flag of `TRUE` if it ends in `/`, or `FALSE` otherwise. It leaves the string pointer on the stack. ~~~ :dir? (s-sf) dup s:length over + n:dec fetch $/ eq? ; ~~~ # Words To Create The Index ~~~ :s:put [ @FID file:write ] s:for-each ; :css ' s:put ; :dtd ' s:put ; :title '