Skip to content

Instantly share code, notes, and snippets.

@breezhang
Created May 27, 2014 05:29
Show Gist options
  • Save breezhang/4819d24674891a9f089e to your computer and use it in GitHub Desktop.
Save breezhang/4819d24674891a9f089e to your computer and use it in GitHub Desktop.
bootstrip themes ...........
#!/usr/bin/perl
use strict;
use warnings;
use feature ':5.14';
use Data::Dumper::Concise;
use Template;
use Carp qw /croak carp confess/;
use JSON::XS;
use Storable;
use LWP::Simple;
#write package gogoog happy!
if(! -e 'c:\output.txt'){
my $content = get("http://api.bootswatch.com/3/") || croak "Couldn't get it!" ;
store decode_json $content, 'c:\output.txt';
}
my $var = retrieve('c:\output.txt');
for(@{$var->{themes}}){
printf "%s || %s|| %s \n", $_->{name}, $_->{thumbnail} ,$_->{css};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment