Skip to content

Utilities to canonicalize Japanese comic series names and author names.

License

Notifications You must be signed in to change notification settings

amakan/amakanize

Repository files navigation

Amakanize

test

Utilities to canonicalize Japanese comic series names and author names.

Installation

Add this line to your application's Gemfile:

gem "amakanize"

And then execute:

bundle

Or manually install:

gem install amakanize

Usage

Require "amakanize" before using classes below.

require "amakanize"

Amakanize::AuthorName

Amakanize::AuthorName.new("ぽんかん(8)").to_s #=> "ぽんかん8"
Amakanize::AuthorName.new("ぽんかん8").to_s #=> "ぽんかん8"
Amakanize::AuthorName.new("ぽんかん⑧").to_s #=> "ぽんかん8"

Amakanize::AuthorNames

Amakanize::AuthorNames.new("ぽんかん⑧,渡 航").map(&:to_s) #=> ["ぽんかん8", "渡航"]
Amakanize::AuthorNames.new("ぽんかん⑧,渡 航").map(&:to_s) #=> ["ぽんかん8", "渡航"]
Amakanize::AuthorNames.new("ぽんかん⑧、渡 航").map(&:to_s) #=> ["ぽんかん8", "渡航"]

Amakanize::BookPosition

Amakanize::BookPosition.new("Fate/Grand Order 電撃コミックアンソロジー (2) (電撃コミックスNEXT)").to_s #=> "2"
Amakanize::BookPosition.new("お迎えです。 6 (花とゆめCOMICS)").to_s #=>  "6"
Amakanize::BookPosition.new("こいつら100%伝説 上 (集英社文庫 お 34-5)").to_s #=> "上"
Amakanize::BookPosition.new("THE BEST STAGE ガールフレンド(♪) ~Side MOMOKO~ (電撃コミックスEX)").to_s #=> ""

Amakanize::SeriesName

Amakanize::SeriesName.new("やはり俺の青春ラブコメはまちがっている。4").to_s #=> "やはり俺の青春ラブコメはまちがっている。"
Amakanize::SeriesName.new("ラブライブ! School idol diary ~星空凛~").to_s #=> "ラブライブ! School idol diary"
Amakanize::SeriesName.new("僕だけがいない街 (1) (カドカワコミックス・エース)").to_s #=> "僕だけがいない街"

Amakanize::VideoPosition

Amakanize::VideoPosition.new("第1話 ソードアート・オンラインII").to_s #=> "1"
Amakanize::VideoPosition.new("デジモンアドベンチャー tri. 第2章「決意」").to_s #=> "2"
Amakanize::VideoPosition.new("楽園追放-Expelled from Paradise-").to_s #=> ""

About

Utilities to canonicalize Japanese comic series names and author names.

Resources

License

Stars

Watchers

Forks

Languages