Skip to content

Commit

Permalink
Small tweaks to the RSS downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Mar 14, 2011
1 parent 0d5bcad commit 2e5fd2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -16,5 +16,6 @@ build:


install:
cpanm Template Template::Plugin::JSON
cpanm Template JSON Template::Plugin::JSON \
XML::RSS local::lib File::Slurp

5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -29,7 +29,10 @@ to be expediently pulled in.

## How it works

Install Template Toolkit (`cpanm Template`), and the JSON plugin (`cpanm Template::Plugin::JSON`) and run `make`. This will in turn run `ttree` and generate output files in the html/ directory.
Install Template Toolkit and the other requirements with `cpanm` by running `make install`.

Then run `make`. This will in turn run `ttree` and generate output
files in the html/ directory.

Image files are copied plainly to the html/ directory.

Expand Down
7 changes: 4 additions & 3 deletions bin/cpanorg_rss_fetch 100644 → 100755
@@ -1,10 +1,11 @@
#!/usr/bin/perl
#!/usr/bin/env perl

use strict;
use warnings;
use local::lib;
use File::Temp;
use XML::RSS;
use JSON::Any;
use JSON;
use File::Slurp;

my $lwp_request
Expand Down Expand Up @@ -32,7 +33,7 @@ sub process_rss {
$rss->parsefile( $conf->{out} );
my $items = $rss->{'items'};

my $j = JSON::Any->new();
my $j = JSON->new();

my $json = $j->encode($items);

Expand Down

0 comments on commit 2e5fd2e

Please sign in to comment.