Chapter 17. Command Line Tools

Table of Contents

Overview
Data Manuipulation
The addmodel Command
The addassoc Command
The wacsdelset Command
Processing Applications
The wacsgenimg Command (formerly generate)
The wacsgenvid Command (formerly genvideo)
The wacsupdinfo Command (formerly updateinfo)
The wacsvidcomb Command
The wacscachectl Command
Automatic Collection Maintenance Tools
The wacsupdstat Command (formerly updatestats)
The wacsblogctl Command

Overview

The Wacs system has actually been around quite a few years now and in the earlier releases almost all the collection administration was performed using command line tools. While we've been busy developing new web-based tools since the Wacs 0.7.x release series, the old command line tools are most definitely still there and perfectly functional. In a few cases (wacsupdinfo, wacsdelset) they are the only way of doing a specific obscure task; in others they may simply be useful building blocks for your use of Wacs. For instance, the addmodel script might be useful in writing a migration script from your previous storage method.

[Note]Note

wacsupdinfo and wacsdelset where known as updateinfo and delset in releases prior to 0.9.2. Same purpose and code however.

In this chapter, we're going to look at what exists and what they can do for you... there are still a few tasks for which they are the only way to do certain things. Firstly, lets summarise what is available:

Table 17.1. Command Line Tools

CommandWeb EquivDescription
addmodelwacsmodelmgrCreates a new model record
addassocwacsaddassocAssociates a model with a pre-existing set
wacsdelsetNoneDeletes a set from the Wacs database (formerly delset
wacsgenimgwacsplacemgr and wacsinfomgr Creates new icons from the image sets, then runs wacsupdinfo (see below - formerly known as generate and updateinfo respectively)
wacsgenvidwacsplacemgr and wacsinfomgr Creates new video sets and updates existing ones (actually used directly by the web-based tools)
wacsupdinfowacsplacemgrCreates new image sets and updates existing ones (actually used directly by the web-based tools) - formerly known as updateinfo
wacsupdstatNoneUpdates the statistics in each model's records based on the sets she's associated with and optionally creates blog entries about recent updates- should be run nightly (formerly known as updatestats)
wacsblogctlNoneManages blog entries - dumps them out to HTML files, loads them in from simple HTML files
wacsvidcombNoneMakes video compilations from multipart videos.
wacscachectlNoneCreates appropriate cache entries for a set - video or image - if the video requires a compilation, use wacsvidcomb first.

We're going to split these command line applications down into two categories - those that handle data manipulation and those that perform processing tasks that require no other intervention. The addmodel, addassoc and wacsdelset commands fall into the former category; wacsgenimg, wacsgenvid, wacsupdinfo and wacsupdstat into tha later.