Changeset 7cdd65d for client/bin
- Timestamp:
- Aug 14, 2010, 9:30:39 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- 618236b, 9dee329
- Parents:
- 55b24d1
- git-author:
- Kyle Brogle <broglek@…> (08/14/10 21:30:39)
- git-committer:
- Kyle Brogle <broglek@…> (08/14/10 21:30:39)
- Location:
- client/bin
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gbq
r9fdf4a1 r7cdd65d 8 8 use Net::CUPS; 9 9 use Net::CUPS::Destination; 10 use Getopt::Long; 10 11 11 my $usage = "Usage: gbq QUEUE\n";12 my $usage = "Usage: gbq [-q QUEUE]\n"; 12 13 13 my $q = $ARGV[0]; 14 my $q = ""; 15 GetOptions ('q|queue=s' => \$q); 14 16 15 17 if (!$q) { 16 print $usage; 17 exit 1 18 $q = "DEFAULT"; 18 19 } 19 20 -
client/bin/gbq.1
r2c76f34 r7cdd65d 4 4 .SH SYNOPSIS 5 5 .B gbq 6 \fIQUEUE\fR 6 [-q \fIQUEUE\fR] 7 7 .SH DESCRIPTION 8 8 Uses the perl Net::CUPS library to access a remote queue and display … … 10 10 Gutenbach queue must have previously been added with 11 11 .B gutenbach-client-config 12 so that gbq knows which host to use. 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. 13 15 .SH SEE ALSO 14 16 gbr(1), gbrm(1), gutenbach-client-config(1) -
client/bin/gbr
r9fdf4a1 r7cdd65d 8 8 use Net::CUPS; 9 9 use Net::CUPS::Destination; 10 use Getopt::Long; 10 11 use Image::ExifTool qw(ImageInfo); 11 12 12 13 my $usage = "Usage: gbr QUEUE FILES\n"; 13 14 14 my $q = $ARGV[0];15 my @files = @ARGV[1 .. $#ARGV];15 my $q = ""; 16 GetOptions ('q|queue=s' => \$q); 16 17 17 if (!$q or !@files) { 18 my @files = @ARGV[0 .. $#ARGV]; 19 20 if (!$q){ 21 $q = "DEFAULT"; 22 } 23 if (!@files) { 18 24 print $usage; 19 25 exit 1 -
client/bin/gbr.1
r38388ac r7cdd65d 4 4 .SH SYNOPSIS 5 5 .B gbr 6 \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 … … 15 15 must have previously been added with 16 16 .B gutenbach-client-config 17 so that gbr knows which host to use. 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. 18 20 .SH SEE ALSO 19 21 gbq(1), gbrm(1), gutenbach-client-config(1) -
client/bin/gbrm
r335786f r7cdd65d 8 8 use Net::CUPS; 9 9 use Net::CUPS::Destination; 10 use Getopt::Long; 10 11 11 my $usage = "Usage: gbq QUEUE ID\n"; 12 my $usage = "Usage: gbq [-q QUEUE] ID\n"; 13 my $q = ""; 14 GetOptions ('q|queue=s' => \$q); 12 15 13 my $q = $ARGV[0]; 14 my @ids = @ARGV[1 .. $#ARGV]; 16 my @ids = @ARGV[0 .. $#ARGV]; 15 17 16 if (!$q or !@ids) { 18 if (!$q){ 19 $q = "DEFAULT"; 20 } 21 if (!@ids) { 17 22 print $usage; 18 23 exit 1 19 24 } 25 20 26 21 27 my $configpath = "$ENV{'HOME'}/.gutenbach/$q"; -
client/bin/gbrm.1
rd768767 r7cdd65d 4 4 .SH SYNOPSIS 5 5 .B gbrm 6 \fIQUEUE\fR[all|current|\fIID\fR]6 [-q \fIQUEUE\fR] [all|current|\fIID\fR] 7 7 .SH DESCRIPTION 8 8 Removes a single job from a Gutenbach queue, given the job id, which … … 19 19 queue. The queue must have previously been added with 20 20 .B gutenbach-client-config 21 so that gbrm knows which host to use. 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. 22 24 .SH SEE ALSO 23 25 gbr(1), gbq(1), gutenbach-client-config(1) -
client/bin/gutenbach-client-config
r30beeab r7cdd65d 19 19 my $delete = ""; 20 20 my $host = ""; 21 my $default = ""; 21 22 22 23 GetOptions ('l|list' => \$list, 24 's|set-default=s' => \$default, 23 25 'a|add=s' => \$add, 24 26 'd|delete=s' => \$delete, … … 30 32 mkdir "$configpath"; 31 33 } 34 #set given queue to default 35 if($default and !$add and !$delete and !$list) { 36 unless(-e "$configpath/$default") { 37 print "Error: queue '$default' doesn't exist yet...you should add it first.\n"; 38 exit 1; 39 } 40 if( -e "$configpath/DEFAULT"){ 41 unlink("$configpath/DEFAULT") or die "Couldn't remove config file '$configpath/DEFAULT'"; 42 } 43 my $symlink_exists = eval { symlink("",""); 1 }; 44 if ($symlink_exists){ 45 symlink("$configpath/$default","$configpath/DEFAULT"); 46 print "Changed default queue to $default.\n"; 47 } 48 else 49 { 50 print "Error creating symlink to $configpath/$default"; 51 exit 1; 52 } 53 } 54 55 32 56 33 57 # list the existing queues 34 if ($list and !$add and !$delete) {58 elsif ($list and !$add and !$delete and !$default) { 35 59 my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'"; 36 60 -
client/bin/gutenbach-client-config.1
r2c76f34 r7cdd65d 4 4 .SH SYNOPSIS 5 5 .B gutenbach-client-config 6 [-l|--list|-a|--add|-d|--delete ] [\fIQUEUE\fR] [--host \fIHOST\fR]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 … … 34 34 \fB\-h\fR, \fB\-\-host\fR HOST 35 35 Hostname for the queue 36 .TP 37 \fB\-s\fR, \fB\-\-set\-default\fR QUEUE 38 Set the default queue 36 39 .SH SEE ALSO 37 40 gbr(1), gbrm(1), gbq(1)
Note: See TracChangeset
for help on using the changeset viewer.