Last active
December 16, 2015 08:59
-
-
Save rblackwe/5409546 to your computer and use it in GitHub Desktop.
Open urls from pinboard tags. pinboard_open today
This file contains 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
use JSON; | |
use WWW::Mechanize; | |
use Browser::Open qw( open_browser ); | |
use JSON::Path; | |
my $url = 'http://feeds.pinboard.in/json/u:rblackwe/t:' . join "/t:", @ARGV; | |
my $mech = WWW::Mechanize->new(); | |
$mech->get($url); | |
my $jpath = JSON::Path->new('$.[*].u'); | |
foreach ( $jpath->values(decode_json $mech->content()) ) { | |
open_browser $_; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment