.. productionBuilder.py command line interface documentation productionBuilder.py (CLI) ============================================= .. automodule::productionBuilder Syntax ++++++++++++++++++++++++++++++++++++++++++ The productionBuilder.py script has the following usage: :: productionBuilder.py Version: 1.0b Build: 2011041401 Framework Version: 1.0b Build: 2011041301 Copyright (C) 2009-2011 Beau Hunter, 318 Inc. Usage: productionBuilder.py --createProductionFromTemplate --productionID=10 Options: -h, --help Displays this help message -v, --version Display version number -c pathtofile, Utilize pathtofile for configuration parameters. --configFile=pathtofile --deviceName='Media' The device to copy the template folder to. If omitted, this value will be read from our configuration file (default: /usr/local/etc/transmogrifier.conf). Configuration ++++++++++++++++++++++++++++++++++++++++++ By default, the productionBuilder.py script utilizes the main transmogrifier.conf file found at /usr/local/etc. In this file, productionBuilder will queue off of a number of parameters configured under the ``[ProductionBuilder]`` Section. The following shows an example productionBuilder configuration: :: [ProductionBuilder] templateFolderPath=/FinalCutServer/Support/Templates/ProjectTemplate assetMDSet='asset_project' targetDeviceName=Library productionAssetFieldMap=Title:Project,Producer,Editor,Client,Production Status:Status As shown above, there are four specific settings, all read in from the ``[ProductionBuilder]`` section, which we will read in from this file. templateFolderPath Specify the full path to the template folder. This template folder will be copied to the root of the specified device. For any items residing in the template folder the string '_ProductionTitle_' will be replaced with the referring project's title. assetMDSet For any files residing directly inside ``templateFolderPath``, we will create an FCS asset using this metadata set. targetDeviceName Specify the device name to which the template will be copied. productionAssetFieldMap This parameter is a string value with two delimiters: a comma separates each project/asset field mapping pair, and a colon delimits the project to asset field mapping. For mappings where both target and source have the same field name, the colon can be ommited. Thus, the string ``Title:Project,Producer,Editor,Client,Production Status:Status`` will map as such: ================= =========== Production Field Asset Field ================= =========== Title Project Producer Producer Editor Editor Client Client Production Status Status ================= =========== .. note: If desired, an alternate configuration file can be used through the ``--configFile=`` parameter. Example Usage ++++++++++++++++++++++++++++++++++++++++++ The productionBuilder.py script has fairly limited scope in regards to command line options. In it's typical usage, we will simply have it build a production template for the specified production. >>> productionBuilder.py --createProductionFromTemplate --productionID=10 In the above usage, our script will first lookup information for the provided production (production with ID 10). Provided that the production exists, it will locate the Project template specified by the ``templateFolderPath`` attribute in our configuration file. This template folder will then be copied to the root of the appropriate device, either passed in via the ``--deviceName`` parameter or as configured via the ``targetDeviceName`` attrubute in our configuration file. For each file residing in our template folder, we will add an asset to Final Cut Server, using the metadata set specified by the ``assetMDSet`` parameter in our config. For each asset that is added, we will then populate metadata as defined in the ``productionAssetFieldMap`` parameter found in our config.