# S020SMPL.def: Controls Sampling # $Id: S020SMPL.def,v 2.5 2012/01/03 13:34:43 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S020SMPL.def,v 2.5 2012/01/03 13:34:43 mschenke Exp $ # # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S020SMPL - Provides RDA Sampling Overview =head1 DESCRIPTION This module provides an overview of the available RDA samples. =cut echo tput('bold'),'Processing Sampling module ...',tput('off') # Initialization var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' # Provide the overview debug ' Inside SMPL module, retrieving available sample archives/files' report overview # Define a macro to add header and table heading macro header {if !isCreated() {import $TOC write '---+!! Sampling Overview' write $TOC write 'The content of this report can be obsolete if the background \ collection is running. It should be stopped for producing this \ report and for packaging the files.' var $TTL = undef } write $arg[0] write '|*File*| *Size*|' } # List the sample archives var $dir = ${OUT.A} if testDir('d',$dir) {prefix call header('---+ Sample Archives') loop $fil (grepDir($dir,concat('^',${CUR.GROUP},'_smp_'),'it')) write '|[[archive/',$fil,'][',encode($fil),']]| ',\ getSize(catFile($dir,$fil)),'|' if hasOutput(true) write $TOP } # List the sample archives var $dir = ${OUT.S} if testDir('d',$dir) {prefix call header('---+ Sample Files') loop $fil (grepDir($dir,concat('^',${CUR.GROUP},'_.*\.(dat|txt)$'),'in')) write '|[[sample/',$fil,'][',encode($fil),']]| ',\ getSize(catFile($dir,$fil)),'|' if hasOutput(true) write $TOP } # Generate the index contributions if the report has some content if isCreated() {toc '1:Sampling' toc '2:[[',getFile(),'][rda_report][Overview]]' } =begin credits =over 10 =item RDA 4.1: John Peeken, John Sobecki, Michel Villette. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut