Group
Extension

Matches 1

RPi-UnicornHatHD ( S/SA/SANKO/RPi-UnicornHatHD-0.07.tar.gz, SANKO, 2019; MetaCPAN )
RPi-UnicornHatHD/ex/reddit_scroll.pl ( view source; MetaCPAN )
use strict;
use warnings;
use RPi::UnicornHatHD;
use Imager;
use HTTP::Tiny;
use JSON::Tiny qw[decode_json];
use Time::HiRes qw[sleep];

# Scroll the front page of Reddit
my $display = RPi::UnicornHat
  = HTTP::Tiny->new->get('https://www.reddit.com/r/all/new.json');
    die "Failed!\n" unless $response->{success};
    my $json = decode_json $response->{content};
    push @titles, map {
        spr
s] %s (/u/%s)',
            $_->{data}{subreddit}, $_->{data}{title}, $_->{data}{author}
    } @{$json->{data}{children}};
    for my $title (map { $_ . ' --- ' } @titles) {
        my $bounds = $font

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.