[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri May 9 20:26:04 UTC 2008


kawas
Fri May  9 16:26:04 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv19621/Perl/MOSES-MOBY/bin/scripts

Modified Files:
	moses-generate-datatypes.pl moses-generate-services.pl 
Log Message:
new -R option added. this allows you to specify a registry url on the command line
moby-live/Perl/MOSES-MOBY/bin/scripts moses-generate-datatypes.pl,1.3,1.4 moses-generate-services.pl,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-datatypes.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-datatypes.pl	2008/02/21 00:12:55	1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-datatypes.pl	2008/05/09 20:26:04	1.4
@@ -8,15 +8,15 @@
 
 # some command-line options
 use Getopt::Std;
-use vars qw/ $opt_h $opt_f $opt_u $opt_d $opt_v $opt_s /;
-getopt;
+use vars qw/ $opt_h $opt_f $opt_R $opt_u $opt_d $opt_v $opt_s /;
+getopts('hfudvsR:');
 
 # usage
 if ($opt_h) {
     print STDOUT <<'END_OF_USAGE';
 Generate datatypes.
-Usage: [-vds] [data-type-name] [data-type-name...]
-	   [-uf]
+Usage: [-R registry-string] [-vds] [data-type-name] [data-type-name...]
+	   [-R registry-string] [-uf]
 	   
     It also needs to get a location of a local cache (and potentially
     a BioMoby registry endpoint, and an output directory). It takes
@@ -24,6 +24,14 @@
 
     If no data type given it generates all of them.
 
+    -R ... a registry string in the form:
+               registry-url[@registry-uri]
+           where registry-uri is optional.
+           For example: 
+              http://localhost/cgi-bin/MOBY-Central.pl
+           or
+              http://localhost/cgi-bin/MOBY-Central.pl@http://localhost/MOBY/Central
+
     -s ... show generated code on STDOUT
            (no file is created, disabled when no data type name given)
     -f ... fill the cache
@@ -46,8 +54,14 @@
 
 sub say { print @_, "\n"; }
 
+if ($opt_R) {
+	my @r = split(/\@/, $opt_R);
+	$opt_R = $r[0];
+}
 
 my $generator = new MOSES::MOBY::Generators::GenTypes;
+$generator->registry($opt_R) if $opt_R;
+
 if ($opt_f) {
 	my $cache = MOSES::MOBY::Cache::Central->new (
 						cachedir => $generator->cachedir,

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl	2008/04/29 19:58:37	1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl	2008/05/09 20:26:04	1.5
@@ -8,17 +8,17 @@
 
 # some command-line options
 use Getopt::Std;
-use vars qw/ $opt_h $opt_d $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t $opt_c /;
-getopt;
+use vars qw/ $opt_h $opt_d $opt_R $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t $opt_c /;
+getopts('hdvasbfuFStcR:');
 # usage
 if (not($opt_u or $opt_f)) {
 if ($opt_h or (not $opt_a and @ARGV == 0)) {
     print STDOUT <<'END_OF_USAGE';
 Generate Services.
-Usage: [-vds] [-b|S|t] authority [service-name] [service-name...]
-       [-vds] [-b|S|t] authority
-       [-vd]  [-b|S|t]a
-       [-fu]
+Usage: [-vds] [-R registry-string] [-b|S|t] authority [service-name] [service-name...]
+       [-vds] [-R registry-string] [-b|S|t] authority
+       [-vd] [-R registry-string] [-b|S|t] -a
+       [-R registry-string] [-fu]
 
     It also needs to get a location of a local cache (and potentially
     a BioMoby registry endpoint, and an output directory). It takes
@@ -27,6 +27,14 @@
     -f ... fill the cache
     -u ... update the cache
     
+    -R ... a registry string in the form:
+               registry-url[@registry-uri]
+           where registry-uri is optional.
+           For example: 
+              http://localhost/cgi-bin/MOBY-Central.pl
+           or
+              http://localhost/cgi-bin/MOBY-Central.pl@http://localhost/MOBY/Central
+    
     -b ... generate base[s] of given service[s]
     -S ... generate implementation and the base of service[s], the
            implementation module has enabled option to read the base
@@ -66,8 +74,13 @@
 
 sub say { print @_, "\n"; }
 
+if ($opt_R) {
+	my @r = split(/\@/, $opt_R);
+	$opt_R = $r[0];
+}
 
 my $generator = new MOSES::MOBY::Generators::GenServices;
+$generator->registry($opt_R) if $opt_R;
 
 if ($opt_f) {
 	my $cache = MOSES::MOBY::Cache::Central->new (




More information about the MOBY-guts mailing list