WACS: Application Programming Interface

Contents

Modules

Shortly after the 0.5 release, a new module called WacsId.pm - The WACS Identification Module - was introduced to concentrate all the heroic heuristics used in guessing details from filenames and other sources of information into a separate location from the main Wacs.pm module. The reason for this is that the heuristics require a lot of tuning and tweeking over time and are usually called only by the importer applications. Should bugs creep into these, keeping them separate would ensure that the functioning of the core Wacs system would be unaffected by changes and updates to these routines.

API definition

Below is a single line summary of each of the exported functions from the each of the WACS support perl modules. Much more detailed information and comments can be found in the source code to the perl modules themselves.

Wacs.pm: The Main WACS Support Module

read_conf() - locate and read the XML based configuration file
conf_get_attr() - get the requested configuration attribute
check_auth() - check that this is an authorised access
auth_user() - return the registered username for this IP
auth_get_attr() - get the requested access control list attribute
describeher() - tries to make a sensible sentance out of model data
whatshedoes() - describes the kind of sets this model appears in
geticonlist() - gets the icon array for the specified object type
addkeyicons() - makes a little HTML table with the attribute icons
gettypecolour() - return background to use for this media type
divideup() - make directory name more readable
iconlink() - build a link around the icon for this set
alsofeaturing() - find and list any other models featured in this set
checkexclude() - check for this file name being one to ignore/hide
addlinks() - add standard navigation links

WacsId.pm: The WACS Identification Module

ident_img() - Identify characteristics of an image set from download info
ident_vid() - Identify characteristics of a video clip from download info
id_get_flag() - get previously determined flag (run ident_* first)
id_get_info() - get previously determined catinfo (run ident_* first)
id_get_photog() - get previously determined photographer (run ident_* first)
addassoc() - Add a new model/set association
dnld_markdone() - mark the download as having been done
alloc_nextkey() - allocate the next free primary key for named table
vid_getsize() - get the size of a video clip
removedups() - clean up a catinfo string
extractphotog() - find the photographer name (only works on ATK at present)
find_namestem() - find the common stem of a file name

Next Section: Database
Back to WACS Documentation Index