NAME

Net::AozoraBunko - Perl Interface for accessing 青空文庫

SYNOPSIS

  use Net::AozoraBunko;
  $ab = Net::AozoraBunko->new;
  $authors = $ab->authors;
  $author = shift @{$authors};
  $author_info = $ab->author($author->{url});
  $works = $ab->works($author->{url});
  $all_works = $ab->works($author->{url});
  $text = $ab->get_text($works->[0]->{url});
  $zip  = $ab->get_zip($works->[0]->{url});
  $search_author_results = $ab->search_author('search_word');
  $search_work_results   = $ab->search_work($author->{url}, 'search_word');

DESCRIPTION

The Aozora Bunko (青空文庫) is the Internet electronic library where consideration is not requested from use. The one assumed to be work that the copyright disappears and "Do not care freely reading" is arranged by TEXT and XHTML (Part is HTML) forms.

Net::AozoraBunko is Perl Interface for accessing 青空文庫. This way it's possible to search authors and download TEXT.

METHODS

new
  my $ab = Net::AozoraBunko->new;
  my $ab = Net::AozoraBunko->new({
      ua => LWP::UserAgent->new(timeout => 15)
  });

Creates a new Net::AozoraBunko object.

authors
  my $authors = $ab->authors;

get authors list

author
  my $author_info = $ab->author($author->{url});

get author's data

works
  my $works = $ab->works($author->{url});

get author's works list

all_works
  my $all_works = $ab->works($author->{url});

get author's all works list. The one under work is contained

get_text
  my $text = $ab->get_text($works->[0]->{url});

get a text

get_zip
  my $zip  = $ab->get_zip($works->[0]->{url});

get a text by zip

search_author
  my $search_author_results = $ab->search_author('search_word');

search authors by a keyword

search_work
  my $search_work_results   = $ab->search_work($author->{url}, 'search_word');

search works by a keyword from authors page.

ua

get/set user agent object

REPOSITORY

Net::AozoraBunko is hosted on github http://github.com/bayashi/Net-AozoraBunko

AUTHOR

Dai Okabayashi <bayashi@cpan.org>

SEE ALSO

http://www.aozora.gr.jp/

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.