Group
Extension

Weather-MOSMIX/script/dump-locations.pl

#!perl
package main;
use strict;
use Weather::MOSMIX;
use JSON 'encode_json';
use Weather::MOSMIX;
use Getopt::Long;

our $VERSION = '0.04';

GetOptions(
    'dsn=s'   => \my $dsn,
);

$dsn ||= 'dbi:SQLite:dbname=mosmix-forecast.sqlite';
my $w = Weather::MOSMIX->new(
    dbh => {
        dsn => $dsn
    },
);

my $f = $w->locations();
binmode STDOUT, ':encoding(UTF-8)';
print encode_json($f);


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