NAME
Acme::Nyaa - Convert texts like which a cat is talking in Japanese
SYNOPSIS
use
Acme::Nyaa;
my
$kijitora
= Acme::Nyaa->new;
$kijitora
->cat( \
'็ซใใใใใใ'
);
# => ็ซใใใใใใใฃใผใ
$kijitora
->neko( \
'็ฅใจๅ่งฃใใ'
);
# => ใใณใจๅ่งฃใใ
DESCRIPTION
Acme::Nyaa is a converter which translate Japanese texts to texts like which a cat talking. Language modules are available only Japanese (Acme::Nyaa::Ja) for now.
Nyaa is ใใฃใผ
, Cats living in Japan meows nyaa
.
CLASS METHODS
new( [%argv] )
new() is a constructor of Acme::Nyaa
my
$kijitora
= Acme::Nyaa->new();
INSTANCE METHODS
cat( \$text )
cat() is a converter that appends string ใใฃใผ
at the end of each sentence.
my
$kijitora
= Acme::Nyaa->new;
my
$nekotext
=
'็ซใใใใใใ'
;
$kijitora
->cat( \
$nekotext
);
# ็ซใใใใใใใฃใผใ
neko( \$text )
neko() is a converter that replace a noun with ใใณ
.
my
$kijitora
= Acme::Nyaa->new;
my
$nekotext
=
'็ฅใฎใใฐใใฏ็ช็ถใซใใ'
;
$kijitora
->neko( \
$nekotext
);
# ใใณใฎใใฐใใฏ็ช็ถใซใใ
nyaa( [\$text] )
nyaa() returns string: ใใฃใผ
.
my
$kijitora
= Acme::Nyaa->new;
$kijitora
->nyaa();
# ใใฃใผ
$kijitora
->nyaa(
'ไบฌ้ฝ'
);
# ไบฌ้ฝใใฃใผ
straycat( \@array-ref | \$scalar-ref [,1] )
straycat() converts multi-lined sentences. If 2nd argument is given then this method also replace each noun with ใใณ
.
my
$nekoobject
= Acme::Nyaa->new;
my
$filehandle
= IO::File->new(
't/a-part-of-i-am-a-cat.ja.txt'
,
'r'
);
my
@nekobuffer
= <
$filehandle
>;
$nekoobject
->straycat( \
@nekobuffer
);
# ๅพ่ผฉใฏ็ซใงใใใใฃใใๅๅใฏใพใ ็กใใใฃใผใ
# ใฉใใง็ใพใใใ้ ใจ่ฆ็ถใใคใใฌใใฃใผใผ! ไฝใฆใๆ่ใใใใใใใๆใงใใฃใผใใฃใผๆณฃใใฆ
# ๅฑ ใไบไธใฏ่จๆถใใฆๅฑ ใใใฃใผใใๅพ่ผฉใฏใใใงๅงใใฆไบบ้ใจใใตใใฎใ่ฆใใใฃใผใผใผใผ! ็ถใใใจใง่ใใจ
# ใใใฏๆธ็ใจใใตไบบ้ใงไธ็ช็ฐๆกใช็จฎๆใงใใคใใใใ ใใฃใใๆญคๆธ็ใจใใตใฎใฏๆใ ๆใ ใๆ
# ใธใฆ็ ฎใฆ้ฃใตใจใใต่ฉฑใงใใใใฃใผ!
SAMPLE APPLICATION
nyaaproxy
nyaaproxy is a sample application based on Plack using Acme::Nyaa. Start nyaaproxy by plackup command like the following and open URL such as http://127.0.0.1:2222/http://ja.wikipedia.org/wiki/ใใณ
.
$ plackup -o 127.0.0.1 -p 2222 -a eg/nyaaproxy.psgi
REPOSITORY
https://github.com/azumakuniyuki/p5-Acme-Nyaa
INSTALL FROM REPOSITORY
% sudo cpanm Module::Install
% cd /usr/
local
/src
% git clone git://github.com/azumakuniyuki/p5-Acme-Nyaa.git
% cd ./p5-Acme-Nyaa
% perl Makefile.PL && make && make test && sudo make install
AUTHOR
azumakuniyuki <perl.org [at] azumakuniyuki.org>
SEE ALSO
Acme::Nyaa::Ja - Japanese module for Acme::Nyaa
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.