O'Reilly logo

Running Weblogs with Slash by David Krieger, Brian Aker, Chromatic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Slash Utilities

Though (or because) it’s a web site management program, Slash comes with several command-line utilities to make your life easier. It’s possible to run a successful site without ever using any of these programs, but they’re fiercely useful. Of the programs in the Slash binaries directory (/usr/local/slash/bin/), the most important is install-slashsite, which was described way back in Section 2.4.6 in Chapter 2. The other utilities are invoked in a similar fashion.

template-tool

The template-tool utility provides access to templates stored in the database. If you are proficient with a Unix text editor, this is the most conveninent way to work with templates.[54] As with all Slash utilities, the tool is invoked from the command line. The single most important option is the -u flag. It takes one argument: the virtual user of the site. The default value is slash; if that is the name of your virtual user, you may skip this flag. The other all-important option is -h, which briefly describes the other available flags. The program will exit if this option is present, regardless of the presence of any other flags.

Editing templates is much easier with template-tool. To modify index;index; default, first extract it from the database to the filesystem. Edit it with your preferred text editor. Finally, update the database with the file. The following example assumes a virtual user of chelle:

[slash@waterwheel /home/slash]$ /usr/local/slash/bin/template-tool
-u chelle ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required