Changes in / [3635420:e15b0b0]


Ignore:
Files:
7 added
9 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbq

    rfc8707b r9dee329  
    11#!/usr/bin/perl
    22
    3 # This script was largely written by Jessica Hamrick (jhamrick), with
    4 # help from Kyle Brogle (broglek)
     3# Written by Jessica Hamrick (C) 2010
    54
    65use strict;
     
    1110use Getopt::Long;
    1211
    13 # usage
    14 my $usage = <<USAGE;
    15 Usage: gbq [options] [-q QUEUE]
     12my $usage = "Usage: gbq [-q QUEUE]\n";
    1613
    17         -q, --queue             Specify a queue other than the default
    18         -h, --help              Print this message
    19 USAGE
     14my $q = "";
     15GetOptions ('q|queue=s' => \$q);
    2016
    21 # initialize the variables for the options
    22 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 }
    34 
    35 # if the -q option is not specified, then assume we're using the
    36 # default queue
    3717if (!$q) {
    3818    $q = "DEFAULT";
    3919}
    4020
    41 # set configuration path, and complain if it doesn't exist
    4221my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    4322if (! -e $configpath) {
     
    4625}
    4726
    48 # initialize the host and queue variables: host holds the address for
    49 # the machine on which the remote queue runs, and queue holds the name
    50 # of the printer
    5127my ($host, $queue);
    5228
    53 # load the configuration file (this will set $host and $queue)
    5429if (-r $configpath) {
    5530    local $/;
     
    5934}
    6035
    61 # initialize a new CUPS session
    6236my $cups = Net::CUPS->new();
    63 # set the server to the one specified in the config file
    6437$cups->setServer("$host");
    65 # set the printer name to the one specified in the config file
    6638my $printer = $cups->getDestination("$queue");
    6739
    68 # if $printer is not defined, then throw an error
    6940unless( $printer){
    7041    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
    7142    exit 1;
    7243}
    73 
    74 # print pretty headings and stuff
    7544print "Queue listing for queue '$queue' on '$host'\n\n";
    7645printf ("%-8s%-15s%s\n","Job","Owner","Title");
    7746print "-"x70 . "\n";
    78 
    79 # get the list of jobs from the printer
    8047my @jobs = $printer->getJobs(0, 0);
    81 
    82 # initialize the job reference and job id variables
    8348my ($job_ref, $jobid);
    8449
    85 # for each job in the list of jobs:
    8650foreach $jobid(@jobs)
    8751{       
    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'};
    9156
    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));
    10158}
  • client/bin/gbq.1

    re83b2d7 r7cdd65d  
    1 .TH gbq 1 "02 October 2010"
     1.TH gbq 1 "27 June 2010"
    22.SH NAME
    33gbq \- displays a remote Gutenbach queue
     
    99the current jobs, along with ID numbers, owners, and filenames.  The
    1010Gutenbach 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
     12so that gbq knows which host to use.  If no queue is specified,
     13.B gbq
     14will try to use the default queue, if one is configured.
    2015.SH SEE ALSO
    2116gbr(1), gbrm(1), gutenbach-client-config(1)
  • client/bin/gbr

    r43ddb7a r600e713  
    11#!/usr/bin/perl
    22
    3 # This script was largely written by Jessica Hamrick (jhamrick), with
    4 # help from Kyle Brogle (broglek)
     3# Written by Jessica Hamrick (C) 2010
    54
    65use strict;
     
    1110use Getopt::Long;
    1211use Image::ExifTool qw(ImageInfo);
    13 use List::Util 'shuffle';
    14 use File::Find;
    1512
    16 # the usage for this script
    17 my $usage = <<USAGE;
    18 Usage: gbr [options] [-q QUEUE] FILES
     13my $usage = "Usage: gbr QUEUE FILES\n";
    1914
    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
     15my $q = "";
     16GetOptions ('q|queue=s' => \$q);
    2817
    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;
     18my @files = @ARGV[0 .. $#ARGV];
    3619
    37 # parse the options
    38 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 exit
    46 if ($help) {
    47     print $usage;
    48     exit 0;
    49 }
    50 
    51 # get the files to print from the arguments
    52 my @files = @ARGV[0 .. $#ARGV];
    53 my @allfiles;
    54 
    55 # if the recursive flag was passed, then recursively find files
    56 if ($recursive) {
    57 
    58     # helper function to add a file to the end of the list, but only
    59     # 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 @allfiles
    68     find(\&append, @files);
    69 
    70     # if we're not shuffling the list, then sort the files.  If we are
    71     # shuffling the list, then don't bother sorting (since we're going
    72     # 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 files
    81 if ($shuffle) {
    82     @files = shuffle(@files);
    83 }
    84 
    85 # if the number flag was specified, then only play the specified
    86 # number of files
    87 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 the
    92 # default queue
    9320if (!$q){
    9421    $q = "DEFAULT";
    9522}
    96 
    97 # if there are no files specified to print, then show the usage,
    98 # because the user is Doing It Wrong
    9923if (!@files) {
    10024    print $usage;
     
    10226}
    10327
    104 # set configuration path, and complain if it doesn't exist
    10528my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    10629if (! -e $configpath) {
     
    10932}
    11033
    111 # initialize the host and queue variables: host holds the address for
    112 # the machine on which the remote queue runs, and queue holds the name
    113 # of the printer
    11434my ($host, $queue);
    11535
    116 # load the configuration file (this will set $host and $queue)
    11736if (-r $configpath) {
    11837    local $/;
     
    12241}
    12342
    124 # initialize a new CUPS session
    12543my $cups = Net::CUPS->new();
    126 # set the server to the one specified in the config file
    12744$cups->setServer("$host");
    128 # set the printer name to the one specified in the config file
    12945my $printer = $cups->getDestination("$queue");
    130 
    131 # if $printer is not defined, then throw an error
    13246unless( $printer){
    133     print "Cannot access queue $q... do you have network connectivity and permission to view the queue?\n";
     47    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
    13448    exit 1;
    13549}
    136 
    137 # initialize the job id and title variables for use below
    13850my ($jobid, $title);
    13951
    140 # for each file that the user wants to print
    14152foreach my $file(@files) {
    142 
    143     # check to see if the file is a youtube video.  If it is, then
    144     # write the URL to a temporary file, and set the number of copies
    145     # on the print job to 42 (this is the dirty hack we have in place
    146     # to indicate that the job is a youtube file instead of a normal
    147     # file)
    14853    if ($file =~ m|http://www\.youtube\.com/watch\?v=|) {
    14954        open FILE, ">", "/tmp/gutenbach-youtube" or die "Couldn't create temporary file";
     
    15358        $printer->addOption("copies", 42);
    15459    }
    155 
    156     # otherwise, we assume it's a normal file.  Try to use exiftool's
    157     # ImageInfo to find out the tag information about the file (i.e.,
    158     # title, artist, and album).  If you can, then rename the job to
    159     # reflect those tags.  Otherwise, keep the normal title.
    16060    else {
    16161        my $fileinfo = ImageInfo($file);
     
    17070    }
    17171
    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    }
    19280}
  • client/bin/gbr.1

    re83b2d7 r7cdd65d  
    1 .TH gbr 1 "02 October 2010"
     1.TH gbr 1 "27 June 2010"
    22.SH NAME
    33gbr \- sends a file to a Gutenbach queue
    44.SH SYNOPSIS
    55.B gbr
    6 [options] [-q \fIQUEUE\fR] \fIFILES\fR
     6[-q \fIQUEUE\fR] \fIFILES\fR
    77.SH DESCRIPTION
    88Prints 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
     9to the files.  gbr correctly handles pathname expansion, so (for
     10example), if you wish to play all .mp3 files in a directory, the
     11command `gbr $queue *.mp3` will send each .mp3 as a separate job.  The
     12path may also be a URL to a
     13.B YouTube
     14video (e.g. http://www.youtube.com/watch?v=foo).  The Gutenbach queue
     15must have previously been added with
     16.B gutenbach-client-config
     17so that gbr knows which host to use.  If no queue is specified,
     18.B gbr
     19will try to use the default queue, if one is configured.
    3820.SH SEE ALSO
    3921gbq(1), gbrm(1), gutenbach-client-config(1)
  • client/bin/gbrm

    rfc8707b r7cdd65d  
    11#!/usr/bin/perl
    22
    3 # This script was largely written by Jessica Hamrick (jhamrick), with
    4 # help from Kyle Brogle (broglek)
     3# Written by Jessica Hamrick (C) 2010
    54
    65use strict;
     
    1110use Getopt::Long;
    1211
    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
     12my $usage = "Usage: gbq [-q QUEUE] ID\n";
    2213my $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 }
     14GetOptions ('q|queue=s' => \$q);
    3415
    3516my @ids = @ARGV[0 .. $#ARGV];
    3617
    37 # if the -q option is not specified, then assume we're using the
    38 # default queue
    39 if (!$q) {
     18if (!$q){
    4019    $q = "DEFAULT";
    4120}
    42 
    43 # if there are no ids specified to remove, then print the usage
    4421if (!@ids) {
    4522    print $usage;
     
    4724}
    4825
    49 # set configuration path, and complain if it doesn't exist
     26
    5027my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    5128if (! -e $configpath) {
     
    5431}
    5532
    56 # initialize the host and queue variables: host holds the address for
    57 # the machine on which the remote queue runs, and queue holds the name
    58 # of the printer
    5933my ($host, $queue);
    6034
    61 # load the configuration file (this will set $host and $queue)
    6235if (-r $configpath) {
    6336    local $/;
     
    6740}
    6841
    69 # initialize a new CUPS session
    7042my $cups = Net::CUPS->new();
    71 # set the server to the one specified in the config file
    7243$cups->setServer("$host");
    73 # set the printer name to the one specified in the config file
    7444my $printer = $cups->getDestination("$queue");
    75 
    76 # if $printer is not defined, then throw an error
    7745unless( $printer){
    7846    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
    7947    exit 1;
    8048}
    81 
    82 # get the list of jobs from the printer
    8349my @jobs = $printer->getJobs(0, 0);
    84 
    85 # for each id that we want to remove
    8650foreach 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];
     51if ($id eq "all") {
     52    foreach $id(@jobs) {
    9953        cancel_job($id, $printer);
    10054    }
    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) id
    109     else {
    110         foreach my $item(@jobs) {
    111             if($item =~ /$id/){
    112                 cancel_job($item, $printer);
    113             }
     55}
     56elsif ($id eq "current") {
     57    $id = $jobs[0];
     58    cancel_job($id, $printer);
     59}
     60elsif ($id eq "last") {
     61    $id = $jobs[-1];
     62    cancel_job($id, $printer);
     63}
     64else {
     65    foreach my $item(@jobs) {
     66        if($item =~ /$id/){
     67            cancel_job($item, $printer);
    11468        }
    11569    }
    11670}
     71}
    11772
    118 # helper function to remove a job
    11973sub cancel_job {
    120     # get the id and printer from the arguments
    12174    my ($id, $printer) = @_;
    122     # get the reference to the job
    12375    my $job_ref = $printer->getJob($id);
    124     # find the job title (so we can print it out for the user)
    12576    my $title = $job_ref->{'title'};
    126     # cancel the job
    12777    $printer->cancelJob($id);
    12878
    129     # print out that we canceled the job
    13079    print "Canceled job '$title' (id $id)\n";
     80 
    13181}
  • client/bin/gbrm.1

    re83b2d7 r7cdd65d  
    1 .TH gbrm 1 "02 October 2010"
     1.TH gbrm 1 "27 June 2010"
    22.SH NAME
    33gbrm \- removes jobs from a Gutenbach queue
     
    77.SH DESCRIPTION
    88Removes 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 specified
    10 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
     9can be obtained with the
     10.B gbq
     11command.  If
     12.B all
     13is used in place of an id, then all jobs are removed from the queue.  If
     14.B current
     15is used in place of an id, then the current (top) job is removed from
     16the queue.  If
     17.B last
     18is used in place of an id, then the last job is removed from the
     19queue.  The queue must have previously been added with
     20.B gutenbach-client-config
     21so that gbrm knows which host to use.  If no queue is specified,
     22.B gbr
     23will try to use the default queue, if one is configured.
    2424.SH SEE ALSO
    2525gbr(1), gbq(1), gutenbach-client-config(1)
  • client/bin/gutenbach-client-config

    rfc8707b r7cdd65d  
    11#!/usr/bin/perl
    22
    3 # This script was largely written by Jessica Hamrick (jhamrick), with
    4 # help from Kyle Brogle (broglek)
     3# Written by Jessica Hamrick, (C) 2010
    54
    65use strict;
     
    87use Getopt::Long;
    98
    10 # the usage for the program
    11 my $usage = <<USAGE;
    12 Usage: gutenbach-client-config [options]
     9my $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";
    1316
    14         -l, --list              List available queues
    15         -a, --add QUEUE         Add a queue (must be used with -h)
    16         -d, --delete QUEUE      Delete a queue
    17         -s, --set-default QUEUE Set the default queue
    18         -h, --host HOST         Hostname for the queue (must be used with -a)
    19         -H, --help              Print this message
    20 USAGE
    21 
    22 # initialize the variables that will hold the arguments
    2317my $list = 0;
    2418my $add = "";
     
    2620my $host = "";
    2721my $default = "";
    28 my $help = 0;
    2922
    30 # get the options from the command line
    3123GetOptions ('l|list' => \$list,
    3224            's|set-default=s' => \$default,
    3325            'a|add=s' => \$add,
    3426            'd|delete=s' => \$delete,
    35             'h|host=s' => \$host,
    36             'H|help' => \$help);
     27            'h|host=s' => \$host);
    3728
    38 # if the -H flag was passed, then print the usage and exit
    39 if ($help) {
    40     print $usage;
    41     exit 0;
    42 }
    43 
    44 # set the path where the configuration files live
    4529my $configpath = "$ENV{'HOME'}/.gutenbach";
    4630
    47 # if the configuration path doens't exist, then make it
    4831if (! -e $configpath) {
    4932    mkdir "$configpath";
    5033}
    51 
    52 # if the 'default' option was specified, then set given queue to
    53 # default
     34#set given queue to default
    5435if($default and !$add and !$delete and !$list) {
    55     # if the specified queue doesn't exist, then throw an error
    5636    unless(-e "$configpath/$default") {
    5737        print "Error: queue '$default' doesn't exist yet...you should add it first.\n";
    5838        exit 1;
    5939    }
    60    
    61     # if there already exists a default, then remove it so we can
    62     # replace it with the new default
    6340    if( -e "$configpath/DEFAULT"){
    6441        unlink("$configpath/DEFAULT") or die "Couldn't remove config file '$configpath/DEFAULT'";
    6542    }
    66 
    67     # check to make sure we can create symlinks
    6843    my $symlink_exists = eval { symlink("",""); 1 };
    69 
    70     # if so, then create the symlink and report it
    7144    if ($symlink_exists){
    7245        symlink("$configpath/$default","$configpath/DEFAULT");
    7346        print "Changed default queue to $default.\n";
    7447    }
    75 
    76     # otherwise, throw an error
    7748    else
    7849    {
     
    8152    }
    8253}
     54   
     55       
    8356
    84 # if the 'list' option was specified, then list the existing queues
     57# list the existing queues
    8558elsif ($list and !$add and !$delete and !$default) {
    86     # get the config files in the configuration path -- these are the queues
    8759    my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'";
    8860
    89     # for each of the queues, load the configuration file and print
    90     # the queue name and the host it's on
    9161    print "Queue\t\tHost\n";
    9262    foreach my $q (@queues) {
     
    10474}
    10575
    106 # if the 'add' option was specified, then add a new queue
     76# add a new queue
    10777elsif (!$list and $add and !$delete) {
    108 
    109     # make sure there was a host specified as well (otherwise, we
    110     # won't know where to print to)
    11178    if (!$host) {
    11279        print $usage;
     
    11481    }
    11582
    116     # if the queue already exists, then print a warning
    11783    if (-e "$configpath/$add") {
    11884        print "Warning: queue '$add' already exists\n";
    11985    }
    12086
    121     # create the configuration file
    12287    open CONFIG, "> $configpath/$add" or die "Couldn't open config file '$configpath/$add'";
    12388    print CONFIG "\$host = \"$host\";\n";
     
    12893}
    12994
    130 # if the 'delete' option was specified, then delete an existing queue
     95# delete an existing queue
    13196elsif (!$list and !$add and $delete) {
    132 
    133     # if the queue doesn't exist, then print an error and exit
    13497    if (! -e "$configpath/$delete") {
    135         print "Error: queue '$delete' does not exist\n";
     98        print "Error: queue '$delete' already exists\n";
    13699        exit 1;
    137100    }
    138101
    139     # otherwise, remove the configuration file
    140102    unlink("$configpath/$delete") or die "Couldn't remove config file '$configpath/$delete'";
    141103}
    142104
    143 # otherwise, it's an unrecognized option, so print the usage and exit
    144105else {
    145106    print $usage;
  • client/bin/gutenbach-client-config.1

    re83b2d7 r7cdd65d  
    1 .TH gutenbach-client-config 1 "02 October 2010"
     1.TH gutenbach-client-config 1 "27 June 2010"
    22.SH NAME
    33gutenbach-client-config \- displays a remote Gutenbach queue
    44.SH SYNOPSIS
    55.B gutenbach-client-config
    6 [options]
     6[-l|--list|-a|--add|-d|--delete|-s|--set-default] [\fIQUEUE\fR] [--host \fIHOST\fR]
    77.SH DESCRIPTION
    88Provides options to add, remove, or list remote Gutenbach queues.  The
     
    2525\fB\-a\fR, \fB\-\-add\fR QUEUE
    2626Add a remote queue.  Must be used in conjunction with
    27 .B \fB\-\-host\fR
     27.B --host
    2828.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
     30Delete a remote queue.  Must be used in conjunction with
     31.B --host
     32.
    3333.TP
    3434\fB\-h\fR, \fB\-\-host\fR HOST
    3535Hostname for the queue
    3636.TP
    37 \fB\-H\fR, \fB\-\-help\fR
    38 Print a help message
     37\fB\-s\fR, \fB\-\-set\-default\fR QUEUE
     38Set the default queue
    3939.SH SEE ALSO
    4040gbr(1), gbrm(1), gbq(1)
  • remctl/lib/gutenbach/volume-helper.py

    r86f0b5b rbbede33  
    2727        v = getVolume()
    2828        newV = percent
    29         for i in range(10+1):
     29        for i in range(10):
    3030                frac = i/10
    3131                tempV = int(v + (newV-v)*frac)
Note: See TracChangeset for help on using the changeset viewer.