Browse files

add a script to take a picture

  • Loading branch information...
1 parent 37a853e commit b862bfdf787bd5e1a8efae1609593a35f4f687a1 @lukec lukec committed Oct 8, 2009
Showing with 21 additions and 0 deletions.
  1. +21 −0 bin/vhs-take-picture
View
21 bin/vhs-take-picture
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use VHS;
+
+my $file = shift || '';
+
+open(my $fh, ">>/tmp/luke") or die "Can't open /tmp/luke: $!";
+print $fh "Taking picture to '$file'\n";
+close $fh;
+
+if ($file) {
+ VHS->picture_to_file($file);
+}
+else {
+ my $uri = VHS->take_picture(shift);
+ print "Took picture: $uri\n";
+}
+

0 comments on commit b862bfd

Please sign in to comment.