Gem Version Build Status

Nokaya

CLI to download photos from several online services including Instagram, Imgur albums, Flickr albums, App.net, Tumblr pages, Photo.net, Deviantart, movies, apps, songs, etc.

Installation

gem install nokaya

Usage

Instagram

nokaya -i url

Also accepts the IFTTT format (like http://ift.tt/1m2Nvz8).

Example:

nokaya -i http://instagram.com/p/noANAfjJ7B/

nokaya -i http://ift.tt/1m2Nvz8

Movie

Downloads a movie poster from (part of) a movie title.

nokaya movie title

Example:

nokaya movie the dark knight

Use option -a to get an alternative.

This is useful for remakes:

nokaya -m solaris

(gives the 2002 version)

nokaya -m -a solaris

(gives the 1972 version)

TV Show

Downloads a tvshow poster and banner from (part of) a movie title.

nokaya tvshow title

Example:

nokaya tvshow battlestar galactica

Use option -a to get an alternative.

nokaya -tv battlestar galactica

(gives the 1978 version)

nokaya -tv -a battlestar galactica

(gives the 2003 version)

App store

Downloads a set of icons and screenshots for a given app name.

Defaults for Mac OSX, use option -i for iOS.

nokaya appstore name

Examples:

nokaya -as marked

nokaya -as -i chimp app.net

Music store

Downloads available art for an iTunes Store song.

Works better if you embed separate elements between quotes.

nokaya music 'song'

nokaya music 'song' 'artist' 'album'

Examples:

nokaya -z 'stairway to heaven'

nokaya -z 'stairway to heaven' 'led zeppelin'

Use the --album option to find an album intead of a song:

nokaya -z --album 'calamari tuesday'

Imgur album

nokaya -ial url

Example:

nokaya -ial http://imgur.com/a/JNzjB\#0

Downloads all images in the album (visible page).

Flickr album

nokaya -fal url

Example:

nokaya -fal https://www.flickr.com/photos/ericdke/sets/72157644556227302/

Downloads all images in the album (visible page).

Tumblr post

nokaya -tu url

Example:

nokaya -tu http://spacequest.tumblr.com/post/83560738152/sexycomics-carlos-valenzuela

Tumblr page

Due to the various themes and layouts existing for Tumblr galleries, this feature may not work perfectly...

Nokaya will try several techniques to extract the image links, then will fallback to scraping all available links if failing at properly detecting photos.

nokaya -tal url

Example:

nokaya -tal http://brekninger.tumblr.com

Downloads all images in the visible page.

Photo.net page

nokaya -pnet url

Example:

nokaya -pnet http://photo.net/gallery/photocritique/filter\?period\=365\&rank_by\=sum\&category\=Architecture\&store_prefs_p\=0

Downloads all images in the page.

nokaya -dart url

Example:

nokaya -dart http://www.deviantart.com/photography/nature/waterscapes/

Downloads all images in the gallery (visible page).

nokaya -ishu url

Example:

nokaya -ishu https://imageshack.com/user/ToddGilbert

Downloads all images in the user gallery (visible page).

If the URL or user is invalid, will download images from the home page.

Favd

nokaya favd url

Example:

nokaya favd http://pic.favd.net/29987710

Option to specify a post number instead of an URL:

nokaya favd -p 29987710

App.net

nokaya adn url

Example:

nokaya adn https://photos.app.net/30055986/1

Option to specify a post number instead of an URL:

nokaya adn -p 30055986

Options

Silent

--no-verbose

Don't display current state on the screen.

nokaya -i --no-verbose http://instagram.com/p/noANAfjJ7B/

Name

--name or -n

Specify a name (without extension).

nokaya -i http://instagram.com/p/noANAfjJ7B/ -n happy_dog.jpg

Output

--output or -o

Specify an output path.

nokaya -i http://instagram.com/p/noANAfjJ7B/ -o ~/Pics

The picture(s) will be downloaded in '~/Downloads' if no output specified.

Both

Specify both.

nokaya -i http://instagram.com/p/noANAfjJ7B/ -o ~/Pics -n happy_dog.jpg

Using Nokaya in a script or irb

Create a new instance of the class you need, with an array of arguments and an hash of options.

Do what you wish with this object, or call its save method to write down the grabbed file(s).

require 'nokaya'
result = Nokaya::Movie.new ['terminator']
result.save

Nokaya object

The argument(s) for the movie/music/app/url - for the request - have to be in an array.

You can pass options in a hash. Options keys are strings that match the name of the corresponding symbol in the Nokaya::App class (which is the CLI interface).

Examples:

require 'nokaya'
client = Nokaya::Movie.new ['solaris'], {'alt' => true}
client = Nokaya::Instagram.new ['http://ift.tt/1m2Nvz8'], {'output' => '/hdd/custom/dir', 'name' => 'pasta.jpg'}
client = Nokaya::Deviantart.new ['http://www.deviantart.com/photography/nature/waterscapes/']
client = Nokaya::ImgurAlbum.new ['http://imgur.com/a/JNzjB\#0']
client = Nokaya::AppStore.new ['marked app']
client = Nokaya::AppStore.new ['chimp', 'app.net'], {'ios' => true}

etc.