Project

mangdown

0.0
No release in over 3 years
Low commit activity in last 3 years
Download Manga
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.0
>= 0

Runtime

 Project Readme

Adapters

Check out lib/mangdown/adapters/mangareader.rb and lib/mangdown/adapters/mangabat.rb for examples of how to build an adapter.

Register an adapter

# Register an adapter (AdapterClass) with the name :name
Mangdown.register_adapter(:name, AdpaterClass.new)

Bundled adapters

There are only two adapters bundled with mangdown, but it is fairly simple to create one, so go ahead and give it a try. Feel free to file an issue if you have any problems.

There is a simple built-in client, "Mangdown::Client", that you can use for finding manga:

require 'mangdown/client'

# Search for an exact match
results = Mangdown::Client.find("Dragon Ball")

# Or if you need more flexibilty when searching for a manga,
# use the db models directly
results = Mangdown::DB::Manga.where(name: 'Bleach').map do |record|
  Mangdown.manga(record.url)
end

# Get a Mangdown::Manga object
manga = results.first

# Get a chapter count
manga.chapter.length

# Download everything
manga.download

# Download a specific range
manga.download(0, 99)

# Download to a specific dir
manga.download_to('path/to/downloads', 0, 99)

# Convert all downloaded chapters to CBZ
manga.cbz