Created
September 9, 2012 18:44
-
-
Save bsdf/3686369 to your computer and use it in GitHub Desktop.
tblq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use WWW::Tumblr; | |
die 'u need to specify some filesz' if not @ARGV; | |
my $t = WWW::Tumblr->new( | |
user => 'YOUR_USERNAME', | |
email => 'YOUR_EMAIL_ADDRESS', | |
password => 'YOUR_PASSWORD', | |
url => 'YOUR_URL', | |
); | |
sub queue_image { | |
my $img = shift; | |
print " -> uploading $img..\n"; | |
$t->write( | |
type => 'photo', | |
state => 'queue', | |
data => $img, | |
) or die $t->errstr; | |
} | |
queue_image $_ for @ARGV; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment