[Bio] / FigKernelScripts / svr_enumerate_sets_by_owner.pl Repository:
ViewVC logotype

View of /FigKernelScripts/svr_enumerate_sets_by_owner.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.1 - (download) (as text) (annotate)
Thu Sep 22 20:52:36 2011 UTC (8 years, 6 months ago) by disz
Branch: MAIN
CVS Tags: rast_rel_2014_0912, rast_rel_2014_0729, mgrast_release_3_1_2, rast_rel_2011_0928, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_10262011, HEAD
New persistent set svr scripts

use strict;

use Getopt::Long;
use SeedEnv;
use PersistentSets;

# This is a SAS Component

=head1 svr_enumerate_sets_by_owner

List all the persistent sets owned by owner

The output is a list of sets names

Example: svr_enumerate_sets_by_owner -owner owner_name  > allsets.tbl

would produce a 1-column table of the owner:set_name of the persistent sets owned by owner_name.

=head2 Command-Line Options

=over 4

=item url

The URL for the Sapling server, if it is to be different from the default.

=item owner

If supplied, sets for the owner name will be supplied, if not supplied, owner name(s) are read from stdin


=head2 Output Format

The standard output is a file where each line contains an owner name and a  set name


my $usage    = "usage: svr_enumerate_sets_by_owner [--owner=owner_name] >output\n";
my $owner = "";
my $url = '';
my $column;
my $opted    = GetOptions('c=i' => \$column, 'owner=s', \$owner, 'url=s', \$url);

if (! $opted) {
    print $usage;
} else {
    if (!$owner) {
	 my @owners = ScriptThing::GetList(\*STDIN, $column);
	for $owner (@owners) {
    } else {

sub get_sets {
    my ($owner) = @_;
    my $sets = PersistentSets::enumerate_sets_by_owner($owner);
    for my $set (@$sets) {
	print "$owner:$set\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3