Changes in / [3635420:e15b0b0]
- Files:
-
- 7 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gbq
rfc8707b r9dee329 1 1 #!/usr/bin/perl 2 2 3 # This script was largely written by Jessica Hamrick (jhamrick), with 4 # help from Kyle Brogle (broglek) 3 # Written by Jessica Hamrick (C) 2010 5 4 6 5 use strict; … … 11 10 use Getopt::Long; 12 11 13 # usage 14 my $usage = <<USAGE; 15 Usage: gbq [options] [-q QUEUE] 12 my $usage = "Usage: gbq [-q QUEUE]\n"; 16 13 17 -q, --queue Specify a queue other than the default 18 -h, --help Print this message 19 USAGE 14 my $q = ""; 15 GetOptions ('q|queue=s' => \$q); 20 16 21 # initialize the variables for the options22 my $q = "";23 my $help = 0;24 25 # parse the options26 GetOptions ('q|queue=s' => \$q,27 'h|help' => \$help);28 29 # if the -h flag was passed, then print the usage and exit30 if ($help) {31 print $usage;32 exit 0;33 }34 35 # if the -q option is not specified, then assume we're using the36 # default queue37 17 if (!$q) { 38 18 $q = "DEFAULT"; 39 19 } 40 20 41 # set configuration path, and complain if it doesn't exist42 21 my $configpath = "$ENV{'HOME'}/.gutenbach/$q"; 43 22 if (! -e $configpath) { … … 46 25 } 47 26 48 # initialize the host and queue variables: host holds the address for49 # the machine on which the remote queue runs, and queue holds the name50 # of the printer51 27 my ($host, $queue); 52 28 53 # load the configuration file (this will set $host and $queue)54 29 if (-r $configpath) { 55 30 local $/; … … 59 34 } 60 35 61 # initialize a new CUPS session62 36 my $cups = Net::CUPS->new(); 63 # set the server to the one specified in the config file64 37 $cups->setServer("$host"); 65 # set the printer name to the one specified in the config file66 38 my $printer = $cups->getDestination("$queue"); 67 39 68 # if $printer is not defined, then throw an error69 40 unless( $printer){ 70 41 print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n"; 71 42 exit 1; 72 43 } 73 74 # print pretty headings and stuff75 44 print "Queue listing for queue '$queue' on '$host'\n\n"; 76 45 printf ("%-8s%-15s%s\n","Job","Owner","Title"); 77 46 print "-"x70 . "\n"; 78 79 # get the list of jobs from the printer80 47 my @jobs = $printer->getJobs(0, 0); 81 82 # initialize the job reference and job id variables83 48 my ($job_ref, $jobid); 84 49 85 # for each job in the list of jobs:86 50 foreach $jobid(@jobs) 87 51 { 88 # get the reference to the job (so we can get various related 89 # variables) 90 $job_ref = $printer->getJob($jobid); 52 $job_ref = $printer->getJob($jobid); 53 my $id = $job_ref->{'id'}; 54 my $user = $job_ref->{'user'}; 55 my $title = $job_ref->{'title'}; 91 56 92 # get the id of the job 93 my $id = $job_ref->{'id'}; 94 # get the user who printed the job 95 my $user = $job_ref->{'user'}; 96 # get the title of the job 97 my $title = $job_ref->{'title'}; 98 99 # print the job information to the screen 100 printf ("%-8s%-15s%s\n","$id",substr("$user",0,15),substr("$title",0,47)); 57 printf ("%-8s%-15s%s\n","$id",substr("$user",0,15),substr("$title",0,47)); 101 58 } -
client/bin/gbq.1
re83b2d7 r7cdd65d 1 .TH gbq 1 " 02 October2010"1 .TH gbq 1 "27 June 2010" 2 2 .SH NAME 3 3 gbq \- displays a remote Gutenbach queue … … 9 9 the current jobs, along with ID numbers, owners, and filenames. The 10 10 Gutenbach queue must have previously been added with 11 \fBgutenbach-client-config\fR so that gbq knows which host to use. If 12 no queue is specified, \fBgbq\fR will try to use the default queue, if 13 one is configured. 14 .TP 15 \fB\-q\fR, \fB\-\-queue\fR 16 Specify a queue other than the default 17 .TP 18 \fB\-h\fR, \fB\-\-help\fR 19 Print the help message 11 .B gutenbach-client-config 12 so that gbq knows which host to use. If no queue is specified, 13 .B gbq 14 will try to use the default queue, if one is configured. 20 15 .SH SEE ALSO 21 16 gbr(1), gbrm(1), gutenbach-client-config(1) -
client/bin/gbr
r43ddb7a r600e713 1 1 #!/usr/bin/perl 2 2 3 # This script was largely written by Jessica Hamrick (jhamrick), with 4 # help from Kyle Brogle (broglek) 3 # Written by Jessica Hamrick (C) 2010 5 4 6 5 use strict; … … 11 10 use Getopt::Long; 12 11 use Image::ExifTool qw(ImageInfo); 13 use List::Util 'shuffle';14 use File::Find;15 12 16 # the usage for this script 17 my $usage = <<USAGE; 18 Usage: gbr [options] [-q QUEUE] FILES 13 my $usage = "Usage: gbr QUEUE FILES\n"; 19 14 20 -q, --queue Specify a queue other than the default 21 -d, --dryrun Just list what would be done 22 -s, --shuffle Randomize the order that the songs are queued in 23 -r, --recursive Recursively find files if a directory is passed in 24 -n, --number NUMBER Only print NUMBER files, if more than NUMBER are given 25 (this will print the first NUMBER files if -s is not given) 26 -h, --help Print this message 27 USAGE 15 my $q = ""; 16 GetOptions ('q|queue=s' => \$q); 28 17 29 # initialize the variables for the options 30 my $q = ""; 31 my $dryrun = 0; 32 my $help = 0; 33 my $shuffle = 0; 34 my $recursive = 0; 35 my $number = 0; 18 my @files = @ARGV[0 .. $#ARGV]; 36 19 37 # parse the options38 GetOptions ('q|queue=s' => \$q,39 'd|dryrun' => \$dryrun,40 'h|help' => \$help,41 's|shuffle' => \$shuffle,42 'r|recursive' => \$recursive,43 'n|number=i' => \$number);44 45 # if the -h flag was passed, then print the usage and exit46 if ($help) {47 print $usage;48 exit 0;49 }50 51 # get the files to print from the arguments52 my @files = @ARGV[0 .. $#ARGV];53 my @allfiles;54 55 # if the recursive flag was passed, then recursively find files56 if ($recursive) {57 58 # helper function to add a file to the end of the list, but only59 # if it is a file (and not a directory)60 sub append {61 my $name = $File::Find::name;62 if (-f $name) {63 push(@allfiles, $name);64 }65 }66 67 # recursively find all the files and add them to @allfiles68 find(\&append, @files);69 70 # if we're not shuffling the list, then sort the files. If we are71 # shuffling the list, then don't bother sorting (since we're going72 # to shuffle it anyway)73 unless ($shuffle) {74 @files = sort(@allfiles);75 } else {76 @files = @allfiles;77 }78 }79 80 # if the shuffle flag was passed, then shuffle the order of the files81 if ($shuffle) {82 @files = shuffle(@files);83 }84 85 # if the number flag was specified, then only play the specified86 # number of files87 if ($number > 0 and $number < $#files) {88 @files = @files[0 .. $number-1]89 }90 91 # if the -q option is not specified, then assume we're using the92 # default queue93 20 if (!$q){ 94 21 $q = "DEFAULT"; 95 22 } 96 97 # if there are no files specified to print, then show the usage,98 # because the user is Doing It Wrong99 23 if (!@files) { 100 24 print $usage; … … 102 26 } 103 27 104 # set configuration path, and complain if it doesn't exist105 28 my $configpath = "$ENV{'HOME'}/.gutenbach/$q"; 106 29 if (! -e $configpath) { … … 109 32 } 110 33 111 # initialize the host and queue variables: host holds the address for112 # the machine on which the remote queue runs, and queue holds the name113 # of the printer114 34 my ($host, $queue); 115 35 116 # load the configuration file (this will set $host and $queue)117 36 if (-r $configpath) { 118 37 local $/; … … 122 41 } 123 42 124 # initialize a new CUPS session125 43 my $cups = Net::CUPS->new(); 126 # set the server to the one specified in the config file127 44 $cups->setServer("$host"); 128 # set the printer name to the one specified in the config file129 45 my $printer = $cups->getDestination("$queue"); 130 131 # if $printer is not defined, then throw an error132 46 unless( $printer){ 133 print "Cannot access queue $q... 47 print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n"; 134 48 exit 1; 135 49 } 136 137 # initialize the job id and title variables for use below138 50 my ($jobid, $title); 139 51 140 # for each file that the user wants to print141 52 foreach my $file(@files) { 142 143 # check to see if the file is a youtube video. If it is, then144 # write the URL to a temporary file, and set the number of copies145 # on the print job to 42 (this is the dirty hack we have in place146 # to indicate that the job is a youtube file instead of a normal147 # file)148 53 if ($file =~ m|http://www\.youtube\.com/watch\?v=|) { 149 54 open FILE, ">", "/tmp/gutenbach-youtube" or die "Couldn't create temporary file"; … … 153 58 $printer->addOption("copies", 42); 154 59 } 155 156 # otherwise, we assume it's a normal file. Try to use exiftool's157 # ImageInfo to find out the tag information about the file (i.e.,158 # title, artist, and album). If you can, then rename the job to159 # reflect those tags. Otherwise, keep the normal title.160 60 else { 161 61 my $fileinfo = ImageInfo($file); … … 170 70 } 171 71 172 # unless it's a dry run, send the print job, given the file and 173 # the job title 174 unless ($dryrun) { 175 $jobid = $printer->printFile($file, $title); 176 177 # if the printFile command returned a job id, then print that out 178 # for the user to see 179 if ($jobid) { 180 print "Sent job '$title' (id $jobid)\n"; 181 } 182 183 # otherwise, let them know that an error occurred 184 else { 185 print "Error sending job '$title'\n"; 186 } 187 188 # otherwise, just print what we would do 189 } else { 190 print "Would send file '$file' with title '$title'\n"; 191 } 72 $jobid = $printer->printFile($file, $title); 73 74 if ($jobid) { 75 print "Sent job '$title' (id $jobid)\n"; 76 } 77 else { 78 print "Error sending job '$title'\n"; 79 } 192 80 } -
client/bin/gbr.1
re83b2d7 r7cdd65d 1 .TH gbr 1 " 02 October2010"1 .TH gbr 1 "27 June 2010" 2 2 .SH NAME 3 3 gbr \- sends a file to a Gutenbach queue 4 4 .SH SYNOPSIS 5 5 .B gbr 6 [ options] [-q \fIQUEUE\fR] \fIFILES\fR6 [-q \fIQUEUE\fR] \fIFILES\fR 7 7 .SH DESCRIPTION 8 8 Prints files to a Gutenbach queue, given the queue name and the path 9 to the files. If no queue is specified with the \fB\-q\fR option, 10 then the default queue will be used (which should be specified with 11 \fBgutenbach-client-config\fR). gbr correctly handles pathname 12 expansion, so (for example), if you wish to play all .mp3 files in a 13 directory, the command `gbr $queue *.mp3` will send each .mp3 as a 14 separate job. The path may also be a URL to a \fBYouTube\fR video 15 (e.g. http://www.youtube.com/watch?v=foo). The Gutenbach queue must 16 have previously been added with gutenbach-client-config so that gbr 17 knows which host to use. If no queue is specified, gbr will try to 18 use the default queue, if one is configured. 19 .TP 20 \fB\-q\fR, \fB\-\-queue\fR 21 Specify a queue other than the default 22 .TP 23 \fB\-d\fR, \fB\-\-dryrun\fR 24 Just list what would be done 25 .TP 26 \fB\-s\fR, \fB\-\-shuffle\fR 27 Randomize the order that the songs are queued in 28 .TP 29 \fB\-r\fR, \fB\-\-recursive\fR 30 Recursively find files if a directory is passed in 31 .TP 32 \fB\-n\fR, \fB\-\-number\fR \fINUMBER\fR 33 Only print NUMBER files, if more than NUMBER are given (this will 34 print the first NUMBER files if -s is not given) 35 .TP 36 \fB\-h\fR, \fB\-\-help\fR 37 Print the help message 9 to the files. gbr correctly handles pathname expansion, so (for 10 example), if you wish to play all .mp3 files in a directory, the 11 command `gbr $queue *.mp3` will send each .mp3 as a separate job. The 12 path may also be a URL to a 13 .B YouTube 14 video (e.g. http://www.youtube.com/watch?v=foo). The Gutenbach queue 15 must have previously been added with 16 .B gutenbach-client-config 17 so that gbr knows which host to use. If no queue is specified, 18 .B gbr 19 will try to use the default queue, if one is configured. 38 20 .SH SEE ALSO 39 21 gbq(1), gbrm(1), gutenbach-client-config(1) -
client/bin/gbrm
rfc8707b r7cdd65d 1 1 #!/usr/bin/perl 2 2 3 # This script was largely written by Jessica Hamrick (jhamrick), with 4 # help from Kyle Brogle (broglek) 3 # Written by Jessica Hamrick (C) 2010 5 4 6 5 use strict; … … 11 10 use Getopt::Long; 12 11 13 # usage 14 my $usage = <<USAGE; 15 Usage: gbq [options] [-q QUEUE] ID 16 17 -q, --queue Specify a queue other than the default 18 -h, --help Print this message 19 USAGE 20 21 # initialize the variables for the options 12 my $usage = "Usage: gbq [-q QUEUE] ID\n"; 22 13 my $q = ""; 23 my $help = 0; 24 25 # parse the options 26 GetOptions ('q|queue=s' => \$q, 27 'h|help', => \$help); 28 29 # if the -h flag was passed, then print the usage and exit 30 if ($help) { 31 print $usage; 32 exit 0; 33 } 14 GetOptions ('q|queue=s' => \$q); 34 15 35 16 my @ids = @ARGV[0 .. $#ARGV]; 36 17 37 # if the -q option is not specified, then assume we're using the 38 # default queue 39 if (!$q) { 18 if (!$q){ 40 19 $q = "DEFAULT"; 41 20 } 42 43 # if there are no ids specified to remove, then print the usage44 21 if (!@ids) { 45 22 print $usage; … … 47 24 } 48 25 49 # set configuration path, and complain if it doesn't exist 26 50 27 my $configpath = "$ENV{'HOME'}/.gutenbach/$q"; 51 28 if (! -e $configpath) { … … 54 31 } 55 32 56 # initialize the host and queue variables: host holds the address for57 # the machine on which the remote queue runs, and queue holds the name58 # of the printer59 33 my ($host, $queue); 60 34 61 # load the configuration file (this will set $host and $queue)62 35 if (-r $configpath) { 63 36 local $/; … … 67 40 } 68 41 69 # initialize a new CUPS session70 42 my $cups = Net::CUPS->new(); 71 # set the server to the one specified in the config file72 43 $cups->setServer("$host"); 73 # set the printer name to the one specified in the config file74 44 my $printer = $cups->getDestination("$queue"); 75 76 # if $printer is not defined, then throw an error77 45 unless( $printer){ 78 46 print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n"; 79 47 exit 1; 80 48 } 81 82 # get the list of jobs from the printer83 49 my @jobs = $printer->getJobs(0, 0); 84 85 # for each id that we want to remove86 50 foreach my $id(@ids){ 87 88 # if the id is 'all', then we remove all jobs 89 if ($id eq "all") { 90 foreach $id(@jobs) { 91 cancel_job($id, $printer); 92 } 93 } 94 95 # if the id is 'current', then we remove just the currently 96 # playing job 97 elsif ($id eq "current") { 98 $id = $jobs[0]; 51 if ($id eq "all") { 52 foreach $id(@jobs) { 99 53 cancel_job($id, $printer); 100 54 } 101 102 # if the id is 'last', then we remove just the last job 103 elsif ($id eq "last") {104 $id = $jobs[-1];105 cancel_job($id, $printer); 106 } 107 108 # otherwise, remove the job based on its actual (numeric) id109 else { 110 foreach my $item(@jobs){111 if($item =~ /$id/){112 cancel_job($item, $printer);113 }55 } 56 elsif ($id eq "current") { 57 $id = $jobs[0]; 58 cancel_job($id, $printer); 59 } 60 elsif ($id eq "last") { 61 $id = $jobs[-1]; 62 cancel_job($id, $printer); 63 } 64 else { 65 foreach my $item(@jobs) { 66 if($item =~ /$id/){ 67 cancel_job($item, $printer); 114 68 } 115 69 } 116 70 } 71 } 117 72 118 # helper function to remove a job119 73 sub cancel_job { 120 # get the id and printer from the arguments121 74 my ($id, $printer) = @_; 122 # get the reference to the job123 75 my $job_ref = $printer->getJob($id); 124 # find the job title (so we can print it out for the user)125 76 my $title = $job_ref->{'title'}; 126 # cancel the job127 77 $printer->cancelJob($id); 128 78 129 # print out that we canceled the job130 79 print "Canceled job '$title' (id $id)\n"; 80 131 81 } -
client/bin/gbrm.1
re83b2d7 r7cdd65d 1 .TH gbrm 1 " 02 October2010"1 .TH gbrm 1 "27 June 2010" 2 2 .SH NAME 3 3 gbrm \- removes jobs from a Gutenbach queue … … 7 7 .SH DESCRIPTION 8 8 Removes a single job from a Gutenbach queue, given the job id, which 9 can be obtained with the \fBgbq\fR command. If no queue is specified10 with the \fB\-q\fR option, then the default queue will be used (which 11 should be specified with \fBgutenbach-client-config\fR). If \fBall\fR 12 is used in place of an id, then all jobs are removed from the queue. 13 If \fBcurrent\fR is used in place of an id, then the current (top) job 14 is removed from the queue. If \fBlast\fR is used in place of an id, 15 then the last job is removed from the queue. The queue must have 16 previously been added with gutenbach-client-config so that gbrm knows 17 which host to use. 18 .TP 19 \fB\-q\fR, \fB\-\-queue\fR 20 Specify a queue other than the default 21 .TP 22 \fB\-h\fR, \fB\-\-help\fR 23 Print the help message 9 can be obtained with the 10 .B gbq 11 command. If 12 .B all 13 is used in place of an id, then all jobs are removed from the queue. If 14 .B current 15 is used in place of an id, then the current (top) job is removed from 16 the queue. If 17 .B last 18 is used in place of an id, then the last job is removed from the 19 queue. The queue must have previously been added with 20 .B gutenbach-client-config 21 so that gbrm knows which host to use. If no queue is specified, 22 .B gbr 23 will try to use the default queue, if one is configured. 24 24 .SH SEE ALSO 25 25 gbr(1), gbq(1), gutenbach-client-config(1) -
client/bin/gutenbach-client-config
rfc8707b r7cdd65d 1 1 #!/usr/bin/perl 2 2 3 # This script was largely written by Jessica Hamrick (jhamrick), with 4 # help from Kyle Brogle (broglek) 3 # Written by Jessica Hamrick, (C) 2010 5 4 6 5 use strict; … … 8 7 use Getopt::Long; 9 8 10 # the usage for the program 11 my $usage = <<USAGE; 12 Usage: gutenbach-client-config [options] 9 my $usage = 10 "Usage: gutenbach-client-config [-l|--list|-a|--add|-d|--delete] [QUEUE] [--host=HOST]\n" . 11 "\n" . 12 "\t-l, --list\t\tList available queues\n" . 13 "\t-a, --add QUEUE\t\tAdd a queue (must be used with -h)\n" . 14 "\t-d, --delete QUEUE\tDelete a queue)\n" . 15 "\t-h, --host HOST\t\tHostname for the queue\n"; 13 16 14 -l, --list List available queues15 -a, --add QUEUE Add a queue (must be used with -h)16 -d, --delete QUEUE Delete a queue17 -s, --set-default QUEUE Set the default queue18 -h, --host HOST Hostname for the queue (must be used with -a)19 -H, --help Print this message20 USAGE21 22 # initialize the variables that will hold the arguments23 17 my $list = 0; 24 18 my $add = ""; … … 26 20 my $host = ""; 27 21 my $default = ""; 28 my $help = 0;29 22 30 # get the options from the command line31 23 GetOptions ('l|list' => \$list, 32 24 's|set-default=s' => \$default, 33 25 'a|add=s' => \$add, 34 26 'd|delete=s' => \$delete, 35 'h|host=s' => \$host, 36 'H|help' => \$help); 27 'h|host=s' => \$host); 37 28 38 # if the -H flag was passed, then print the usage and exit39 if ($help) {40 print $usage;41 exit 0;42 }43 44 # set the path where the configuration files live45 29 my $configpath = "$ENV{'HOME'}/.gutenbach"; 46 30 47 # if the configuration path doens't exist, then make it48 31 if (! -e $configpath) { 49 32 mkdir "$configpath"; 50 33 } 51 52 # if the 'default' option was specified, then set given queue to 53 # default 34 #set given queue to default 54 35 if($default and !$add and !$delete and !$list) { 55 # if the specified queue doesn't exist, then throw an error56 36 unless(-e "$configpath/$default") { 57 37 print "Error: queue '$default' doesn't exist yet...you should add it first.\n"; 58 38 exit 1; 59 39 } 60 61 # if there already exists a default, then remove it so we can62 # replace it with the new default63 40 if( -e "$configpath/DEFAULT"){ 64 41 unlink("$configpath/DEFAULT") or die "Couldn't remove config file '$configpath/DEFAULT'"; 65 42 } 66 67 # check to make sure we can create symlinks68 43 my $symlink_exists = eval { symlink("",""); 1 }; 69 70 # if so, then create the symlink and report it71 44 if ($symlink_exists){ 72 45 symlink("$configpath/$default","$configpath/DEFAULT"); 73 46 print "Changed default queue to $default.\n"; 74 47 } 75 76 # otherwise, throw an error77 48 else 78 49 { … … 81 52 } 82 53 } 54 55 83 56 84 # if the 'list' option was specified, thenlist the existing queues57 # list the existing queues 85 58 elsif ($list and !$add and !$delete and !$default) { 86 # get the config files in the configuration path -- these are the queues87 59 my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'"; 88 60 89 # for each of the queues, load the configuration file and print90 # the queue name and the host it's on91 61 print "Queue\t\tHost\n"; 92 62 foreach my $q (@queues) { … … 104 74 } 105 75 106 # if the 'add' option was specified, thenadd a new queue76 # add a new queue 107 77 elsif (!$list and $add and !$delete) { 108 109 # make sure there was a host specified as well (otherwise, we110 # won't know where to print to)111 78 if (!$host) { 112 79 print $usage; … … 114 81 } 115 82 116 # if the queue already exists, then print a warning117 83 if (-e "$configpath/$add") { 118 84 print "Warning: queue '$add' already exists\n"; 119 85 } 120 86 121 # create the configuration file122 87 open CONFIG, "> $configpath/$add" or die "Couldn't open config file '$configpath/$add'"; 123 88 print CONFIG "\$host = \"$host\";\n"; … … 128 93 } 129 94 130 # if the 'delete' option was specified, thendelete an existing queue95 # delete an existing queue 131 96 elsif (!$list and !$add and $delete) { 132 133 # if the queue doesn't exist, then print an error and exit134 97 if (! -e "$configpath/$delete") { 135 print "Error: queue '$delete' does not exist\n";98 print "Error: queue '$delete' already exists\n"; 136 99 exit 1; 137 100 } 138 101 139 # otherwise, remove the configuration file140 102 unlink("$configpath/$delete") or die "Couldn't remove config file '$configpath/$delete'"; 141 103 } 142 104 143 # otherwise, it's an unrecognized option, so print the usage and exit144 105 else { 145 106 print $usage; -
client/bin/gutenbach-client-config.1
re83b2d7 r7cdd65d 1 .TH gutenbach-client-config 1 " 02 October2010"1 .TH gutenbach-client-config 1 "27 June 2010" 2 2 .SH NAME 3 3 gutenbach-client-config \- displays a remote Gutenbach queue 4 4 .SH SYNOPSIS 5 5 .B gutenbach-client-config 6 [ options]6 [-l|--list|-a|--add|-d|--delete|-s|--set-default] [\fIQUEUE\fR] [--host \fIHOST\fR] 7 7 .SH DESCRIPTION 8 8 Provides options to add, remove, or list remote Gutenbach queues. The … … 25 25 \fB\-a\fR, \fB\-\-add\fR QUEUE 26 26 Add a remote queue. Must be used in conjunction with 27 .B \fB\-\-host\fR27 .B --host 28 28 .TP 29 \fB\-d\fR, \fB\-\-delete\fR QUEUE Delete a remote queue.30 .TP 31 \fB\-s\fR, \fB\-\-set\-default\fR QUEUE 32 Set the default queue 29 \fB\-d\fR, \fB\-\-delete\fR QUEUE 30 Delete a remote queue. Must be used in conjunction with 31 .B --host 32 . 33 33 .TP 34 34 \fB\-h\fR, \fB\-\-host\fR HOST 35 35 Hostname for the queue 36 36 .TP 37 \fB\- H\fR, \fB\-\-help\fR38 Print a help message37 \fB\-s\fR, \fB\-\-set\-default\fR QUEUE 38 Set the default queue 39 39 .SH SEE ALSO 40 40 gbr(1), gbrm(1), gbq(1) -
remctl/lib/gutenbach/volume-helper.py
r86f0b5b rbbede33 27 27 v = getVolume() 28 28 newV = percent 29 for i in range(10 +1):29 for i in range(10): 30 30 frac = i/10 31 31 tempV = int(v + (newV-v)*frac)
Note: See TracChangeset
for help on using the changeset viewer.