| Short description: |
Utility for creating static websites using erb. |
| Category: |
Application/WWW/Textproc |
| Status: |
stable |
| Created: |
2003-07-04 16:16:33 GMT |
| Last update: |
- |
| Owner: |
jcheng
(Projects of this owner) |
| Homepage: |
not available |
| Download: |
http://www.joecheng.com/code/erb-site_1.0.3.tar.gz
|
| License: |
PublicDomain |
| Dependency: |
|
| Description: |
NOTE: erb must be installed (tested with erb-2.0.3).
erb-site can be used to run erb recursively over a
directory that contains both erb and non-erb files.
This is useful for creating static sites, for example.
Use erb-site to process a directory that contains
eRuby files (and other files)--your "source" directory.
You also need to provide a "build" directory path (it
doesn't need to exist, and in fact if it does exist,
it will be recursively DELETED before processing begins).
erb-site will crawl your source directory, and for each
file it encounters:
* with .!! extension (or with ".!!." in the filename)
Process using erb, and save the results to the
corresponding path in the build directory minus
the .!! extension (or minus the ".!!." in the
filename). You can use your own string in place
of "!!" by specifying the --watch option.
(Note that file.!!.txt, file.txt.!!, and file.!!
all match, but file!!.txt and file!! do not.)
* with .rb extension
Ignore completely. This allows you to keep helper
functions and modules in separate files without
worrying about them getting into your deployment.
* all other extensions
Copied to corresponding build directory with no
changes.
For example, if this is your directory tree:
source/functions.rb
source/index.htm.!!
source/guestbook.php
source/contactme.!!.php
source/images/banner.gif
source/private/photos.!!.htm
And you ran this command:
erb-site.rb source build
Your build directory would end up like this:
build/index.htm
build/guestbook.php
build/contactme.php
build/images/banner.gif
build/private/photos.htm
|