Changeset b58aada
- Timestamp:
- Jul 5, 2010, 8:01:47 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups, web
- Children:
- d768767
- Parents:
- 38388ac
- git-author:
- Jessica B. Hamrick <jhamrick@…> (07/05/10 20:01:47)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (07/05/10 20:01:47)
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r323f614 rb58aada 1 1 *~ 2 2 client/bin/*.1.gz 3 debian/ -
README
r03e2535 rb58aada 87 87 package or something 88 88 89 - add regex support to the client scripts, so you can do something90 like `gbr sipbmp3 *.mp3` and have it send separate jobs to the queue91 92 89 - add client scripts for the remctl package, something maybe like 93 90 `gbvol [set|get] number`. Or maybe just leave it with using remctl. … … 95 92 - fix the web interface 96 93 97 - fix the youtube feature. Additionally, make it possible to play98 movies!94 - Make it possible to play movies; i.e. add video support (the audio 95 support is already there, obviously) -
client/bin/gbq
r30beeab rb58aada 38 38 39 39 print "Queue listing for queue '$queue' on '$host'\n\n"; 40 print "Job ID\t\tOwner\t\t File\n";40 print "Job ID\t\tOwner\t\tTitle\n"; 41 41 print "-----------------------------------------------------------------\n"; 42 42 -
client/bin/gbr
r38388ac rb58aada 5 5 use strict; 6 6 use warnings; 7 8 use Net::CUPS; 9 use Net::CUPS::Destination; 10 use Image::ExifTool qw(ImageInfo); 7 11 8 12 my $usage = "Usage: gbr QUEUE FILES\n"; … … 31 35 } 32 36 33 $ENV{CUPS_SERVER}="$host"; 37 my $cups = Net::CUPS->new(); 38 $cups->setServer("$host"); 39 my $printer = $cups->getDestination("$queue"); 40 my ($jobid, $title); 34 41 35 42 foreach my $file(@files) { 36 43 if ($file =~ m|http://www\.youtube\.com/watch\?v=|) { 37 open(LP, "|-", "lp", "-d$queue") or die "Couldn't execute lp command"; 38 print LP "$file"; 39 close LP; 44 open FILE, ">", "/tmp/gutenbach-youtube\n" or die "Couldn't create temporary file"; 45 print FILE $file; 46 $title = $file; 47 $file = "/tmp/gutenbach-youtube"; 48 $printer->addOption("copies", 42); 40 49 } 41 50 else { 42 my $pid = open(LP, "-|"); 43 if (not $pid) { 44 my @args = ("lp", "-d$queue", "$file"); 45 exec(@args) or die "Couldn't execute lp command"; 51 my $fileinfo = ImageInfo($file); 52 my $magic = $fileinfo->{FileType}; 53 54 if ($magic) { 55 $title = $fileinfo->{'Title'}." - ".$fileinfo->{'Artist'}." - ".$fileinfo->{'Album'}; 56 } 57 else { 58 $title = $file; 46 59 } 47 60 } 48 61 49 print "Sent job '$file'\n"; 62 $jobid = $printer->printFile($file, $title); 63 64 if ($jobid) { 65 print "Sent job '$title' (id $jobid)\n"; 66 } 67 else { 68 print "Error sending job '$title'\n"; 69 } 50 70 } -
client/bin/gbrm
ra81397c rb58aada 34 34 } 35 35 36 my @args; 36 my $cups = Net::CUPS->new(); 37 $cups->setServer("$host"); 38 my $printer = $cups->getDestination("$queue"); 39 my @jobs = $printer->getJobs(0, 0); 37 40 38 41 if ($id eq "all") { 39 @args = ("cancel", "-a", "$queue"); 42 foreach $id(@jobs) { 43 $printer->cancelJob($id); 44 } 40 45 } 41 46 elsif ($id eq "current") { 42 my $cups = Net::CUPS->new(); 43 $cups->setServer("$host"); 44 my $printer = $cups->getDestination("$queue"); 45 my @jobs = $printer->getJobs(0, 0); 46 my $id = $jobs[0]; 47 @args = ("cancel", "$id", "$queue"); 47 $id = $jobs[0]; 48 $printer->cancelJob($id); 48 49 } 49 50 else { 50 @args = ("cancel", "$id", "$queue");51 $printer->cancelJob($id); 51 52 } 52 $ENV{CUPS_SERVER}="$host";53 exec (@args) or die "Couldn't execute cancel command"; -
server/lib/gutenbach
rc5a98db rb58aada 121 121 $SIG{HUP} = \&clear_status; 122 122 $SIG{TERM} = \&clear_status; 123 $SIG{INT} = \&clear_status; 123 124 124 125 # Read the metadata information from the file.
Note: See TracChangeset
for help on using the changeset viewer.