Skip to content

Instantly share code, notes, and snippets.

@bsdf
Created September 9, 2012 18:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsdf/3686369 to your computer and use it in GitHub Desktop.
Save bsdf/3686369 to your computer and use it in GitHub Desktop.
tblq
#!/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