# NAME Acme::Nyaa - Convert texts like which a cat is talking in Japanese # SYNOPSIS use Acme::Nyaa; my $kijitora = Acme::Nyaa->new; print $kijitora->cat( \'猫ãŒã‹ã‚ã„ã„。' ); # => 猫ãŒã‹ã‚ã„ã„ニャー。 print $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](http://search.cpan.org/perldoc?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 = '猫ãŒã‹ã‚ã„ã„。'; print $kijitora->cat( \$nekotext ); # 猫ãŒã‹ã‚ã„ã„ニャー。 ## __neko( _\\$text_ )__ neko() is a converter that replace a noun with `ãƒã‚³`. my $kijitora = Acme::Nyaa->new; my $nekotext = '神ã®ã•ã°ãã¯çªç„¶ã«ãã‚‹'; print $kijitora->neko( \$nekotext ); # ãƒã‚³ã®ã•ã°ãã¯çªç„¶ã«ãã‚‹ ## __nyaa( \[_\\$text_\] )__ nyaa() returns string: `ニャー`. my $kijitora = Acme::Nyaa->new; print $kijitora->nyaa(); # ニャー print $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>; print $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](http://search.cpan.org/perldoc?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.