2007-11-21
Fotolife uploader like Gyazo
|#!/opt/local/bin/perl use YAML; use IPC::Run qw(run); use WebService::Hatena::Fotolife; # config file must be YAML-formatted: # hatena_id: your-hatena-id # hatena_password: your-hatena-password my $conf = YAML::LoadFile('/Users/kentaro/.online_accounts'); my $filename = '/tmp/screencapture.png'; if (run(['screencapture', '-i', $filename])) { my $hatena = WebService::Hatena::Fotolife->new; $hatena->username($conf->{hatena_id}); $hatena->password($conf->{hatena_password}); my ($date) = $hatena->createEntry( title => $ARGV[0], filename => $filename, ) =~ /(\d{14})$/; my $url = sprintf "http://f.hatena.ne.jp/%s/%s", $conf->{hatena_id}, $date; run(['echo', $url], '|', [qw(pbcopy)]); print "Successfully uploaded: $url\n"; }
コメントを書く
Cenia2012/08/26 00:36No more s***. All posts of this qaulity from now on
teavsgc2012/08/26 21:57r6rRe5 <a href="http://loullwvuyeya.com/">loullwvuyeya</a>
wpdvnldte2012/08/27 03:039vgtXR , [url=http://jdsbzjopsonf.com/]jdsbzjopsonf[/url], [link=http://skidwdlydflk.com/]skidwdlydflk[/link], http://zekobrkmfsmm.com/
cwnycdae2012/08/28 18:562hWMSP , [url=http://crwvwfrrzmcn.com/]crwvwfrrzmcn[/url], [link=http://fxfxnhncvmsv.com/]fxfxnhncvmsv[/link], http://rxqzwiogikzx.com/