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

Annotation of /FigKernelScripts/svr_put_set.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : disz 1.1 use strict;
2 :    
3 :     use Getopt::Long;
4 :     use SeedEnv;
5 :     use PersistentSets;
6 :    
7 :     #
8 :     # This is a SAS Component
9 :     #
10 :    
11 :    
12 :     =head1 svr_put_set
13 :    
14 :     Add entries to a persistent set owned by owner
15 :    
16 :     Owner name and set name(s) are required.
17 :    
18 :     Owner must be supplied with the -owner command line argument.
19 :    
20 :     Set name must be supplied with the -set_name argument
21 :    
22 :     Example: svr_put_set -owner owner_name -set_name set_name < set_contents.tbl
23 :    
24 :     would read a 1-column table of entries and add them to the contents of the set named set_name owned by owner.
25 :     ------
26 :    
27 :     =head2 Command-Line Options
28 :    
29 :     =over 4
30 :    
31 :     =item url
32 :    
33 :     The URL for the Sapling server, if it is to be different from the default.
34 :    
35 :     =item owner
36 :    
37 :     If supplied, owner name will be used for all subsequent operations
38 :    
39 :     =item set_name
40 :    
41 :     If supplied, all entries will be added to this set
42 :    
43 :     =item -c Column
44 :    
45 :     This is used only if the column containing the input, owner and/or set names is not the last.
46 :    
47 :     =back
48 :    
49 :     =head2 Output Format
50 :    
51 :     =cut
52 :    
53 :     my $usage = "usage: svr_put_set [--owner=owner_name] [--set_name=set_name] >output\n";
54 :     my $owner = "";
55 :     my $set_name = "";
56 :     my $column;
57 :     my $url = '';
58 :     my $opted = GetOptions('c=i' => \$column, 'owner=s', \$owner, 'set_name=s', \$set_name, 'url=s', \$url);
59 :    
60 :     if (! $opted) { print STDERR $usage; exit }
61 :     if (!$set_name || !$owner) {
62 :     print "Missing Owner Set name\n"; exit
63 :     }
64 :    
65 :     my @entries = ScriptThing::GetList(\*STDIN, $column);
66 :     PersistentSets::put_to_set($set_name, $owner, \@entries);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3