WACS: Console Tools

Contents

Adders

These are console commands that let you add a new record into the database. At the present moment, they need to be driven with some care and really could use a re-write. It is important to understand that some database fields are assumed to have only a very limited range of legal values: in only some cases are these enforced by these programs. If in any doubt, please refer to the page on database table structures.

addmodel

This is the cornerstone of getting Wacs to manage sets based upon models; you need to be able to create new models first. This console command is designed to do this - a web or graphical interface is most definitely on the future plans list. This program currently calls the old "xv" Unix/ Linux image viewer to display the model icon, but could easily be changed to run eog, display or some other image viewer. The variable imgviewer at the top of the program controls this. It is not critical if it's not present or can't make a connection to an X-server. In most cases, addmodel will actually prompt for the major items of data if they are missing from the command line. It currently prompts for hair colour, length, titsize, pussy and attributes. If a source is specified but no usual, it will default it (in most cases). If an icon of the same name as that given in the image= line also exists in the bigicons directory, it's name will be added too.

A simple example of using addmodel would be:

% addmodel name=Sarah hair=Redhead length=Normal titsize=Small pussy=Shaven image=Sarah-1.jpg
Sarah is not known
Name: Sarah
Hair Colour: Redhead
Hair Length: Normal
Titsize: Small
Attributes:
Pussy: S
Aliases:
Usual Source:
Image:
Source:
RefNo:
OK to add (x for exclude) ? (y/n/x): y
Model number is 2249
SQL: insert into models (modelno, mname, mhair, mlength, mtitsize, mattributes,
maliases, musual, mimage, mstatus, mflag, mpussy, madded) values( '2249','Sarah'
,'Redhead','Normal','Small','','','','','A','N','S','9-OCT-2006')
% 
As you can see from the above, addmodel summarises what it has parsed from the command line and seeks confirmation before proceeding with the creation of the record. If you do confirm, it creates the model giving you the model number assigned and the SQL used in the creation process. Let's review for a moment the standard values expected here - hopefully they are reasonably obvious.

Legal Values In AddModel
Hair Colour Hair Length Titsize Pussy
Blonde Short Tiny Shaven
Brunette Shoulder Small Trimmed
Redhead Normal Normal Hairy
Dark Long Large  

In practice, the addmodel command line is usually a bit more complex, lets consider an example from amkingdom.com.

% addmodel name=Erika hair=Brunette length=Long titsize=Tiny pussy=Shaven attrib
utes='shaven tinytit tattoo' refno=eri046 altref=12475 source=AMK usual=amkingdo
m.com image=amkingdom/Erika-1.jpg
[...]
%

OK, going through the new fields here. The setting of attributes adds some extra information to aid searching by models - in this case, her unusual attributes that differ from what is "normal" are that she has exceptionally small breasts, a completely shaven pussy and a few tattoos. The next keyword refno normal contains her model number at the source site; usually this is just a simple number. However in the case of the AMKingdom web site, there is a corporate wide "identity" which takes the form of three letters and then three numbers; in her case eri for Erika and 046 which we assume means she's the 46th model added with the first three letters of eri. Some of the other AMK group sites, such as ATK Premium navigate using the corporate id as the "model key", but the AMKingdom site (aka ATK Galeria) uses an older system based on a numeric reference. This is the altref specified here. At present, this is the only site I've encountered with this arrangement, but having the dual key support available just adds to the flexibility of the system. The source directive gives us the "domain" in which these keys apply. In this case we're setting it to "AMK" for AMKingdom.com. With these three specified, we'll be adding a record in the idmap table as well, mapping Erika with our model number 2075 to being "Erika" from AMKingdom.com with corporate id eri046 and model key 12475. Additional id mappings (for instance Erika also appears on ATExotics) have to be added manually using SQL at present. The next field, usual merely makes a comment in the models table of where we usually find this model, in practice this usually means where we first found her! (This is defaulted to whatever source is set to if not specified.) The final attribute image specifies an icon for her (conventionally resized to 120x156) and in this case the icons have been subdivided by source site, so her icon appears in the amkingdom sub-directory. It also checks for the same name of file existing in the bigicons directory, and if it does, that is added too.

addassoc

This is a much simpler command to use, it quickly associates a model with a set or range of sets. It does help if this command is in your path, but it can be called by pathname too (usually). Do remember that a set has to be known by WACS before you can associate it with any model, so in most cases the generate command below needs to have been run first. Anyway, to use addassoc for example for our redhead called Sarah, you would do:
% cd image_location/redheads/smalltits/Sarah
% addassoc Sarah Sarah_*
1. Sarah with Long Redhead hair and Small tits - model number=2249
Name: Sarah
Hair Colour: Redhead
Hair Length: Long
Titsize: Small
Attributes: shaven tattoo
Aliases:
Usual Source:
Image: Sarah-1.jpg
RefNo: 2249
Continue (y/n)? y
DB record found: setno 10661, title: Sarah PinkDressNoPanties GardenBenchDildo
Added association between Sarah (2249) and set 10661
%
If the name isn't unique, addassoc offers you a list of the choices along with their model numbers. Pick the one you want and use the model number prefixed with a # instead of the name, ie #2249 instead of Sarah.

Digesters

These are applications that look at an existing filesystem structure and try their best to digest the content into metadata and insert it into the database. The two main such applications are generate and updateinfo, however since the invocation technique is the same and generate automatically calls updateinfo with the values it was called with, they are effectively the same. Do note that updateinfo is invoked without specifying a path name by generate, so if they are not in your default path, updateinfo will not get run and no sets records will get created. You also need to consider existance and ownership of the various icon directories defined in the configuration file before running generate. It will only create directories below those defined in the configuration file, never those top level points. If you used easyinstall, this should have been taken care of.

generate - import directories of files into the Wacs system

Running generate is actually very simple, to import a tree of file directories (say image_location/redheads/smalltits/Sarah) you just do:
% generate redheads/smalltits/Sarah
[...]
COMPLETED: 12 new records inserted, 7 updated.
Calling make_index() with redheads/smalltits/Sarah
% 
all that is then needed is to do the appropriate addassoc command to associate the newly added sets with Sarah (see above). Generate can recursively scan from the top of the images tree (or from any point on the sub-tree), but probably best avoided if you have a large number of directories in the system.

The generate/updateinfo commands also possess knowledge of download records and if via a number of heuristics to do with the names, stems or name structure it determines that it knows of the set in question, it will retrieve additional information like model number, set type, source site and photographer from the download record and merge that information with what it can determine from the name of the directory and the model's attributes. The download record will be marked as having been successful and will disappear from the model's detailed page.

New in 0.7.2Additionally if the set in question has been unpacked by the web based unpack/placement tools, a file called ".unpack" will be used to pass information on the download record number from the download mechanism to the importation/catalogue system.

As was mentioned in the overview, certain keywords are recognised within the directory name and used to define various special attributes in the default metadata. Whether the metadata is manipulated manually, semi- manually or automatically is controlled by the sauto flag for each set record within the sets table. These guesses are performed by the function guesscatinfo() in updateinfo. For now, it's probably best to look at the source code of that function to get some idea of how this works. Hopefully some more detailed documentation can be added in due course.

updateinfo - work out set status and attributes

Please see the information given in the section on generate above.

genvideo - import video files into the Wacs system

Genvideo performs much the same functions as the combination of generate and updateinfo for the importation of video clips into the Wacs system. It actually also includes aspects of the updateinfo program but re-written for the video context. However the video naming convention is a lot simpler and what meta data there is in inferred from the download record as very little information can be gleaned from the name of the file itself. Note that although the relative pathnames appear the same, genvideo operates in a parallel space under the videos tree in the file system. At present it requires the presence of a download record before it will perform a new record addition - this can be created in SQL as follows:
sql> select max(downloadno) from download;

	2672
sql> insert into download (downloadno, dmodelno, dsite, dtype, dsetkey,
   > dsetname, darchive)
   > values( 2673,2249,'XYZ','V','sarah04.mpg',
   > 'Sarah - Pink Dress - Garden Bench','sarah04.mpg');

1 row added.
sql> commit;

commit complete.
sql> quit

To import a directory of Sarah's videos, you would do: genvideo redheads/smalltits/Sarah and it will scan that directory for .mpg, .wmv, .mov and .avi files. Note that the icons are automatically referred to by the same pathname but in the vidicons directory. Therefore for sarah01.mpg in videos/redheads/smallbreasts/Sarah, you would place the corresponding icon file as sarah01.jpg in vidicons/redheads/smallbreasts/Sarah.

updatestats - update model statistics

The model record keeps some basic statistics about the sets and types of activity featured in those sets in order to better describe the model and her activities (on camera). Of course, much of this information is ultimately derived from the sets she features in; for instance, if she features in a lesbian set, the assumption is that she does lesbian scenes on camera! Obviously examining every set each time a model page is loaded is unlikely to be very practical, so the schema design has this data cached. Updatestats is the program that updates this cached attribute data in the model record. It should be run periodically, probably nightly via the cron command.

Populators

These commands read XML files which come as part of the distribution and use the contents of those files to populate some of the database tables with some sensible initial values.

vendpop - populate the vendors table

This command reads the vendors.xml file and populates the vendors table with some useful example site (aka vendor) description records. These provide examples on how to configure the automatic download system as embodied in the chkmodel and getarc programmes, and should be directly usuable for any of the sites listed as soon as you add an appropriate username, password and subscription expiry date and set the subscription active.

photpop - populate the photographer table

New in 0.7.2 This command reads the photographer.xml file and populates the photographer table with some useful example records. These will typically be photographers whose work has been encountered on a number of different websites and who have a "corporate" presence on the web.

Migrators

These commands allow the moving (or migration) of model and set details between different installations of WACS. They also provide a way to dump and reload the WACS database should you need to. The idea is that the export dump file is a self-contained object which can be safely emailed or transferred between systems of different types. An XML format container is used, and the data objects stored inside it, including images such as the model and set icons. Binary objects (like JPEG images) are stored using the MIME base 64 standard.

wacsexport - export model details

New in 0.6.1 This command creates an XML file containing details of a specific model including her model record, head shot icon in both normal and big forms if available, idmap records and the download records for all her sets that have a known source. This file has the binary data encoded in base 64 so that it can be safely emailed, cut-and-pasted, etc. The command is invoked with just the model no as an argument, thus if Sarah is model no 7, running wacsexport with: wacsexport 7 will create a file called "Sarah-7.xml" in the current directory.

wacsimport - import model details

New in 0.6.1 This command imports an XML file containing details of a specific model as exported by wacsexport above. It is invoked with the file name of the XML export file, so following the example above, running wacsimport with: wacsimport Sarah-7.xml would import Sarah's details, icon(s) and idmaps into the local Wacs database. Note that by default, a brand new model number will be issued on the new system unless wacsimport determines that the same model already exists there, quite possibly under another model number.

This it does by comparing the idmap entries - it assumes that if the model is recorded by one site as being a certain ID on a remote site, any new information about her should be loaded onto the record of a model who has a reference to being the same ID on the same named remote site. So, if the XML file says Sarah is "sar001" on site AMK, "55" on site XYZ and "12789" on site TVW and we have a model who is "sar001" on AMK, that model's records will be updated with extra ID mappings as "55" on site XYZ and "12789" on site TVW.

Janitors

These are little utilities to help with cleaning out the cruft from the Wacs system - duplicate sets, etc.

delset - delete an image set

New in 0.6.1 Delset is passed a single argument of a directory name (which is assumed to contain an image set known to Wacs) and proceeds to delete the database records related to it in the correct order. Once complete it moves the files into the "delset" directory of the download directory where they can be checked on more time before the files themselves are erased.
Next Section: Security
Back to WACS Documentation Index