Giter VIP home page Giter VIP logo

cloudplaya's Introduction

cloudplaya

cloudplaya is a Python library and command line utility for querying Amazon's Cloud Player service. It can be used to build playlists, download songs, or integrate with other software that needs to talk to Cloud Player.

Installation

To install cloudplaya, just run:

$ sudo easy_install cloudplaya

Authenticating

You will need to first authenticate with Amazon Cloud Player. This will store .cloudplayarc file in your home directory containing some session information. Note that it's possible you may have to repeat this on occasion.

To authenticate, run:

$ cloudplaya authenticate --username <email_address> --password <password>

Replace <email_address> and <password> with your Amazon account e-mail and password above.

You're then ready to use cloudplaya!

Commands

cloudplaya has a few different commands that are used to fetch data from Amazon Cloud Player. They each have their own arguments, and are invoked like:

$ cloudplaya command [options]

get-album

Displays information on an album. It requires the --artist and --name options, and will show some basic information on the album.

For example:

$ cloudplaya get-album --artist "The Birthday Massacre" --name "Walking With Strangers"
Walking With Strangers by The Birthday Massacre (12 tracks)

You can use --format to specify the format for display. This defaults to %(name)s by %(artist_name)s (%(num_tracks)s tracks). Use %r with any query to see all the available options. (This will display a Python dictionary of the data.)

get-albums

Lists all the albums in the account, or all matching the given options.

You can use --artist to specify an artist name. In this case, it will show all albums by that artist. If you don't specify an artist, all albums in your account will be listed.

For example:

$ cloudplaya get-albums --artist "Greg Edmonson"
Firefly

You can use --format to specify the format for display. This defaults to %(name)s by %(artist_name)s (%(num_tracks)s tracks). Use %r with any query to see all the available options. (This will display a Python dictionary of the data.)

get-artists

Lists all artists with albums in your account.

For example:

$ cloudplaya get-artists
...
Trent Reznor and Atticus Ross (56 tracks)
Various Artists (1 tracks)
Video Games Live (18 tracks)
...

You can use --format to specify the format for display. This defaults to %(name)s (%(num_tracks)s tracks). Use %r with any query to see all the available options. (This will display a Python dictionary of the data.)

get-songs

Lists all songs in the account, or all matching the given options.

You can narrow down the results by using one or more of --artist, --album, or --title.

For example:

$ cloudplaya get-songs --album "Walking With Strangers"
The Birthday Massacre - Falling Down
The Birthday Massacre - Goodnight
The Birthday Massacre - Kill The Lights
The Birthday Massacre - Looking Glass
The Birthday Massacre - Movie
The Birthday Massacre - Red Stars
The Birthday Massacre - Remember Me
The Birthday Massacre - Science
The Birthday Massacre - To Die For
The Birthday Massacre - Unfamiliar
The Birthday Massacre - Walking With Strangers
The Birthday Massacre - Weekend

You can use --format to specify the format for display. This defaults to %(artist_name)s - %(title)s'. Use %r with any query to see all the available options. (This will display a Python dictionary of the data.)

get-stream-urls

Lists URLs for one or more songs. These can be used to download or stream the songs.

This command takes song IDs as parameters. You can retrieve a song ID by using the %(id)s format argument to get-songs above.

For example:

$ cloudplaya get-songs --album "Walking With Strangers" --format "%(id)s"
12fad491-033f-43f2-9fff-c65a96ccf173
...

$ cloudplaya get-stream-urls 12fad491-033f-43f2-9fff-c65a96ccf173
http://blahblah.amazonaws.com/lotsandlotsofstuff

(IDs and URLs have been changed to protect the innocent.)

download-album

Downloads all the songs in an album.

This command requires the --album and --artist options. It can also take a --out-directory (or -o) to specify where to save the files (defaults to the current directory).

It also can take a --format option to specify the filename format (defaults to %(album_name)s/%(track_num)s. %(title)s.%(extension)s). This will create any directories as needed.

For example:

$ cloudplaya download-album --album "Walking With Strangers" --artist "The Birthday Massacre"

Progress will be reported as the album downloads.

download-all

Downloads all songs by artist.

This command has a --start-at-artist option, which will start downloading based on a specified artist name, skipping any entries are lexicographically smaller. To test this command, --dry-run will run through the steps without actually downloading. It can also take a --out-directory (or -o) to specify where to save the files (defaults to the current directory).

It also can take a --format option to specify the filename format (defaults to %(album_name)s/%(track_num)s. %(title)s.%(extension)s). This will create any directories as needed.

For example:

$ cloudplaya download-all --start-at-artist "Fartbarf" --dry-run --out-directory /tmp/

Progress will be reported as the songs are downloaded.

cloudplaya's People

Contributors

chipx86 avatar mshuffett avatar tedder avatar tgross avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.