Command Line Features

WACS being a Linux/Unix application it wouldn't really feel complete without some command line based features! At the moment there's really only two of these that are useful to users of the WACS system (most of the others are targetted at collection administration tasks). These are rungq and runmp - both applications are very similar and can accept similar options and arguments; rungq is for collections of sets containing image files; runmp is for those containing video files.

Obviously we had to select the image viewer and movie player applications to use and the ones we selected were gqview for image sets and mplayer for video clips. The author of gqview was very kind in implementing a small modification to the package itself which allows the sequential browsing of the images in a list of directories supplied to the program. The original choice of gqview was driven by it's good performance, very rapid good quality image scaling and nice un-interupted fullscreen mode. To get it into full screen mode, just press the f key. For video playback, we selected MPlayer because of it's vast range of compatible video formats, uncluttered display and ability to be started directly in fullscreen mode via the command line options passed to it by runmp.


Your Linux distribution may not have choosen to install either of these as a standard viewer, but there most definitely should be package versions available. See the installation manual for more information on this.

Rungq - Command Line Viewer

It's a little tricky to show a full screen display as anything other than the content itself with a black border, so we're just going to show you the command and diagnostic messages you can expect to see when running these programs.

Rungq in action

The rungq command (and for that matter runmp) can take any one of:

  • a saved search
  • a connection set
  • a model number

To view a saved search containing images you can either simply give the number of the tag set, or you can prefix it with t or tag and it will invoke the Linux/Unix image viewer gqview with a list of actual directories containing the sets to be viewed. This allows the viewing of a slideshow full-screen and at the best possible quality without using a web browser as an intermediary. Generally a local image viewer can do a better job at going full screen than a web browser can.

To view a connection is very similar as you give it's number prefixed with c or conn . You can also view all the sets for a given model using the same mechanism but changing the prefix to m, mod or model. Additionally any of these can also be filtered to show only sets of a single type, so for instance if you want to see only Toy-based sets from model no 10, you can do: rungq --cat=T mod10.

And of course that's not the end of it either; in Wacs 0.8.4 we added some further new features. Firstly, preference exclusions now work in rungq and runmp. These start off with the normal default of ignoring Backstage and Duplicate sets. You can cancel that default and see them by specifying: rungq --excl= mod10. You can add additional exclusions by specifying the type you want excluded, so for instance to exclude the defaults of B (Backstage) and D (Duplicate) and Straight sets you need only specify: rungq --excl=F m2195. To specify even more exclusions, you just need to give a comma separated list, so to exclude Group Orgy as well, you'd use: rungq --excl=F,G m2195. These same exclusions can be applied to connections and tag sets as well as models.

Another new feature in Wacs 0.8.4 is a --skip= parameter; this allows you to start viewing the selection from somewhere through the results. Typically if you've viewed half way through a connection, it'll let you jump right back in mid-way through rather than having to skip through the sets you've already seen. To skip the first ten sets in connection 7, you'd do: rungq --skip=10 c7.

Rungq should usually work on the web server itself; getting it to work on other hosts means making the files available by NFS in a suitable place, setting up a suitable wacs.cfg file (a copy of the one from the web server usually suffices) and getting the database connection working from Perl. This usually means installing the MySQL client side code (or Oracle equivalent), the relevant Perl DBD/DBI drivers and setting the access permissions on the database to allow database connections from the other host. There is a discussion of how to do this in the configuration manual.

Runmp - Command Line Movie Player

Just as the rungq can take a collection of different sets and make a slideshow of them, the runmp command will take a collection of different video clips and string them together as a movie show. The two commands are very closely related and accept all the same options. Both may be used on a single tag set (saved search), model's collection or connection which contains a mixture of set media types and they will merely ignore the type that they don't handle. That is rungq will ignore videos and runmp will ignore images.

Runmp in action

I'm sure those of you used to using mplayer on the command line will be familiar with it's profusion of diagnostics...