Project

yotsuba

0.0
No commit activity in last 3 years
No release in over 3 years
Yotsuba facilitates getting download links from the DomDomSoft Anime Downloader server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
>= 0
~> 10.0
~> 3.2

Runtime

~> 2.11
~> 0.7
 Project Readme

Yotsuba Gem Version Total number of downloads

Yotsuba facilitates getting download links from the DomDomSoft Anime Downloader server.

Installation

Add this line to your application's Gemfile:

gem 'yotsuba'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yotsuba

Usage

Quick Start

Warning: This documentation was written for v0.4.0 and has not yet been updated.

$ export DOMDOM_KEY='your-domdom-key-goes-here'
anime = Yotsuba::Anime["Clannad: After Story"]
anime.files # => Array of episode files
episode = anime.files.first # Get the first file from the anime
episode.download_links # => Array of download links (zip parts)

Verbose Example

Yotsuba.get_animes # explicitly download the anime list. Yotsuba::Anime.all and Yotsuba::Anime[] call this automatically.
Yotsuba::Anime.clear_anime_list! # explicitly clear the anime list. It will be automatically cleared when you use get_animes so there's not often a reason to use this.
Yotsuba::Anime.all # All the Animes. Will remain cached until you redownload the list.

Yotsuba::Anime[123] # Returns the Anime object with id 123.
Yotsuba::Anime["Title"] # Returns the Anime object with title "Title".
Yotsuba::Anime[/Sword/] # Returns an array of all Animes whose titles match the supplied regexp.

anime = Yostuba::Anime["Some Anime"]
anime.files # Returns all the File objects from the anime.
anime.id # => 123
anime.title # => "Some Anime"
anime.num_files # 24
# Note that anime.files requests file info from the server, but anime.num_files does not, so it's faster than anime.files.length

episode = anime.files.first
episode.id # => 1234
episode.name # => "[Coolsubs] Some Anime Episode 01 [12B4D2].mp4"
episode.size # file size in bytes
episode.first_downloaded # Date object of the first time you downloaded this file
episode.times_downloaded # How many times you have downloaded this file before
episode.anime_id # => 123
episode.anime # Anime object that owns this episode
episode.download_links # Returns array of download links (zip parts)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

Contributing

  1. Fork it ( https://github.com/suchipi/yotsuba/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request