Skip to content

Instantly share code, notes, and snippets.

@rblackwe
Last active December 16, 2015 08:59
Show Gist options
  • Save rblackwe/5409546 to your computer and use it in GitHub Desktop.
Save rblackwe/5409546 to your computer and use it in GitHub Desktop.
Open urls from pinboard tags. pinboard_open today
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