App-Zapzi
view release on metacpan or search on metacpan
0.004 2013-07-09 15:10:08 Asia/Hong_Kong
* Added command aliases md, rd and cat
* Update installation instructions
* Set explicit version dependencies for modules
* Use roles and plugins in Transform module
0.003 2013-07-08 23:02:34 Asia/Hong_Kong
* Update READMEs
* Make implicit dependency on DateTime::Format::SQLite
* Set error attribute correctly
0.002 2013-07-08 15:40:37 Asia/Hong_Kong
* --version command line option
* Handle HTML entities in article titles correctly
* Use an in-memory SQLite database to speed up testing
* Tidy up class access
0.001 2013-07-07 22:18:51 Asia/Hong_Kong
}
},
"runtime" : {
"requires" : {
"Browser::Open" : "0",
"Carp" : "0",
"Cwd" : "0",
"DBIx::Class::Core" : "0",
"DBIx::Class::Schema" : "0",
"Data::Validate::URI" : "0.06",
"DateTime" : "0",
"DateTime::Format::SQLite" : "0",
"EBook::EPUB" : "0.6",
"EBook::MOBI" : "0.69",
"Email::MIME" : "1.924",
"Email::Sender::Simple" : "1.300006",
"Email::Simple" : "0",
"Email::Simple::Creator" : "0",
"Encode" : "0",
"Exporter" : "0",
"File::HomeDir" : "0",
"File::MMagic" : "1.30",
- t
- t/lib
- xt
requires:
Browser::Open: '0'
Carp: '0'
Cwd: '0'
DBIx::Class::Core: '0'
DBIx::Class::Schema: '0'
Data::Validate::URI: '0.06'
DateTime: '0'
DateTime::Format::SQLite: '0'
EBook::EPUB: '0.6'
EBook::MOBI: '0.69'
Email::MIME: '1.924'
Email::Sender::Simple: '1.300006'
Email::Simple: '0'
Email::Simple::Creator: '0'
Encode: '0'
Exporter: '0'
File::HomeDir: '0'
File::MMagic: '1.30'
Makefile.PL view on Meta::CPAN
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.013010",
"NAME" => "App::Zapzi",
"PREREQ_PM" => {
"Browser::Open" => 0,
"Carp" => 0,
"Cwd" => 0,
"DBIx::Class::Core" => 0,
"DBIx::Class::Schema" => 0,
"Data::Validate::URI" => "0.06",
"DateTime" => 0,
"DateTime::Format::SQLite" => 0,
"EBook::EPUB" => "0.6",
"EBook::MOBI" => "0.69",
"Email::MIME" => "1.924",
"Email::Sender::Simple" => "1.300006",
"Email::Simple" => 0,
"Email::Simple::Creator" => 0,
"Encode" => 0,
"Exporter" => 0,
"File::HomeDir" => 0,
"File::MMagic" => "1.30",
Makefile.PL view on Meta::CPAN
);
my %FallbackPrereqs = (
"Browser::Open" => 0,
"Carp" => 0,
"Cwd" => 0,
"DBIx::Class::Core" => 0,
"DBIx::Class::Schema" => 0,
"Data::Validate::URI" => "0.06",
"DateTime" => 0,
"DateTime::Format::SQLite" => 0,
"EBook::EPUB" => "0.6",
"EBook::MOBI" => "0.69",
"Email::MIME" => "1.924",
"Email::Sender::Simple" => "1.300006",
"Email::Simple" => 0,
"Email::Simple::Creator" => 0,
"Encode" => 0,
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::HomeDir" => 0,
lib/App/Zapzi/Database/Schema/Article.pm view on Meta::CPAN
package App::Zapzi::Database::Schema::Article;
# ABSTRACT: zapzi article table
use utf8;
use strict;
use warnings;
our $VERSION = '0.017'; # VERSION
use base 'DBIx::Class::Core';
use DateTime::Format::SQLite;
__PACKAGE__->load_components(qw/InflateColumn::DateTime/);
__PACKAGE__->table("articles");
__PACKAGE__->add_columns
(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"title",
lib/App/Zapzi/Publish.pm view on Meta::CPAN
use warnings;
our $VERSION = '0.017'; # VERSION
use Module::Find 0.11;
our @_plugins;
BEGIN { @_plugins = sort(Module::Find::useall('App::Zapzi::Publishers')); }
use App::Zapzi;
use Carp;
use DateTime;
use Encode;
use HTML::Entities;
use Moo;
has format => (is => 'ro', default => 'MOBI');
has folder => (is => 'ro', required => 1);
lib/App/Zapzi/Publish.pm view on Meta::CPAN
}
}
return;
}
sub _get_title
{
my $self = shift;
my $dt = DateTime->now;
return sprintf("%s - %s", $self->folder, $dt->strftime('%d-%b-%Y'));
}
sub _make_filename
{
my $self = shift;
my ($title, $extension) = @_;
my $app = App::Zapzi::get_app();
my $base = sprintf("Zapzi - %s.%s", $title, $extension);
t/03-articles.t view on Meta::CPAN
move_article delete_article
articles_summary export_article) );
}
sub test_get
{
my $first = get_article(1);
ok( $first, 'Can read Inbox first article' );
is( $first->id, 1, 'Inbox first article ID is 1' );
my $now = DateTime->now(time_zone => 'local');
is( $first->created->delta_days($now)->days, 0,
'Date inflated in articles OK' );
my $false_article = get_article(0);
ok( ! $false_article, 'Can detect articles that do not exist' );
}
sub test_add
{
my $art = add_article(title => 'Foo',
( run in 0.385 second using v1.01-cache-2.11-cpan-05444aca049 )