The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

daizu - command line interface to Daizu CMS

SYNOPSIS

    export DAIZU_CONFIG=/etc/my-daizu-config.xml

    # Get a working copy
    daizu checkout

    # Bring it up to date with new revisions
    daizu update

    # Publish any new stuff
    daizu publish

    # Load new revisions (done automatically when updating
    # a working copy, so not normally needed)
    daizu load-revisions

    # Manually reload articles (not normally necessary)
    daizu update-article example.com/blog/article.html
    daizu update-all-articles

    # Manual URL updates (not normally necessary)
    daizu update-urls example.com/blog
    daizu update-all-urls

    # Manual publishing (not normally necessary)
    daizu publish-url http://example.com/page.html
    daizu publish-site http://example.com/

    # Publish to stdout (for testing)
    daizu url-content http://example.com/ >homepage.html

DESCRIPTION

This program allows you to operate Daizu, getting it to load content from the Subversion repository (by checking out or updating working copies), and publish the URLs generated by that content.

A Daizu configuration file is required. You can specify where yours is by setting the DAIZU_CONFIG environment variable to its path. You can also provide the value in the -c option when you run daizu.

The following subcommands are available:

load-revisions

Load new revisions from the content repository, up to the latest revision. If the -r option is given then it specifies a revision number to load up to instead.

Revisions are automatically loaded when working copies are checked out and updated, so you won't normally need to do this.

checkout [branch]

Create a new working copy in the database and bring it up to the latest revision of the content repository, or to the revision specified by the -r option.

An additional argument can be specified, which should identify a branch to check out from. It can be either the path of the branch in the repository (something like branches/redesign) or the ID number of a branch in the database. The default is trunk.

update [wc-id]

Bring a working copy up to date with the latest revision, or the revision specified by the -r option. If the extra argument is given then the working copy specified by that ID number is updated (it should be the id column of the working_copy table). By default the live working copy is updated.

publish

Bring the live website (or sites) up to date with the latest changes in the live working copy in the database. After committing a new revision and using the update command to update the live WC, running this should do everything necessary to update the sites (except in exceptional circumstances like when you've changed custom templates).

If you provide a -r option with a revision number, then that revision will be used as the starting point for figuring out what changes need to be published. The default is to start from the last revision which was published in this way. There is no way to change the revision which the output is updated to, it's always whatever is in the live working copy.

publish-url url [wc-id]

Publish the given URL, writing its output however is specified by the configuration file. This will fail if there isn't a suitable output element in the configuration file to specify the document root.

The extra argument gives the ID number of the working copy to get the content from, and defaults to the live working copy.

update-urls path [wc-id]

Generate the URLs for file at the given path. The resulting URLs are stored in the database and assumed to have been published, so you'd better actually publish any new ones straight after doing this.

The extra argument specifies the ID number of the working copy to generate URLs for, and defaults to the live working copy.

update-all-urls [wc-id]

Same as update-urls above, but generates URLs for all files which currently exist in the working copy.

Note that currently URLs which are no longer attached to an extant file will not be marked 'gone' as they should be. Also note that if this fails half-way through it may leave the database partially updated.

update-article path [wc-id]

Reload the article at the specified path, using the appropriate article loader plugin, and cache the resulting content and metadata. This should normally be done automatically when a working copy is updated.

The extra argument specifies the ID number of the working copy in which to look for the path, and defaults to the live working copy.

update-all-articles [wc-id]

Same as update-article above, but reloads all article files which currently exist in the working copy.

The whole thing is done in a single database transaction.

url-content url [wc-id]

Generate the content for the specified URL, and print it to the standard output. Doesn't update the database or publish the content anywhere.

Takes the content from the specified working copy, or the live working copy by default.

publish-site base-url [wc-id]

Generates content for all URLs which start with the base URL given. For example, if base-url is http://www.daizucms.org/ then all of the URLs on that domain will be generated. The content is written to the proper output location as for the publish command.

COPYRIGHT

This software is copyright 2006 Geoff Richards <geoff@laxan.com>. For licensing information see this page:

http://www.daizucms.org/license/