Acme-MetaSyntactic-Themes

 view release on metacpan or  search on metacpan

lib/Acme/MetaSyntactic/donmartin.pm  view on Meta::CPAN

=encoding iso-8859-1

=cut

package Acme::MetaSyntactic::donmartin;
use strict;
use Acme::MetaSyntactic::List;
our @ISA = qw( Acme::MetaSyntactic::List );
our $VERSION = '1.005';
__PACKAGE__->init();

our %Remote = (
    source  => 'http://madcoversite.com/dmd-alphabetical.html',
    extract => sub {
        return
            # split a few items that are way too long
            map /CHIRP_TIK_TIK_KRIK_BREET_BREET_TOOD_TOOD_KRIDIT_KRIDIT_BREET/
                ? ( substr( $_, 0, 163 ), substr( $_, 164 ) )
                : $_,
            map /TIKAK_KAK_BINGCHIKA_CHUNK_THWIZZIK_ZAK/
                ? ( substr( $_, 0, 164 ), substr( $_, 165 ) )
                : $_,

            # pick and clean up items from the HTML table
            map {
                s/\s+/ /g;

                # remove HTML
                s/<[^>]+>//g;
                s/&(?:hellip|nbsp);/_/g;
                s/\(etc\. etc\.\)//g;

                # do the "n times" math, but shorten items that are too long
                s/twice/2 times/;
                s/four times/4 times/;
                s/nine times/9 times/;
                s/eleven times/11 times/;
                s/52 times/24 times/;
                s/FOOM FWEE BOOM DOOM DING \(12 times\)/FOOM FWEE BOOM DOOM DING \(10 times\)/;
                s/(.*?)\([^\)\d]*?(\d+) times[^\)]*\)/$1x$2/eg;

                # remove unsightly characters
                y/-_ !'.,… /_/s;
                s/^_+|_+$//g;

                # send the final result
                $_;
            }
            $_[0] =~ m!<tr[^<]+<td[^<]+<font[^<]+size=4>\s*(.*?)\s*</font>!igs;
    },
);

1;

=head1 NAME

Acme::MetaSyntactic::donmartin - The Don Martin theme

=head1 DESCRIPTION

The sound effects from Don Martin's comics.

The comprehensive list is found on Doug Gilford's Mad Cover Site:
L<http://www.madcoversite.com/dmd.html>.

=head1 CONTRIBUTOR

Vahe Sarkissian.

=head1 CHANGES

=over 4

=item *

2018-10-29 - v1.005

Updated from the source web site in Acme-MetaSyntactic-Themes version 1.052.

=item *

2016-03-21 - v1.004

Updated from the source web site in Acme-MetaSyntactic-Themes version 1.049.



( run in 0.775 second using v1.01-cache-2.11-cpan-39bf76dae61 )