mirror of
https://github.com/cooperhammond/irs.git
synced 2025-01-10 20:25:27 +00:00
commit
0063f4fe32
13
.travis.yml
13
.travis.yml
|
@ -2,6 +2,7 @@ language: python
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
|
- "3.6"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sudo aptitude -y -q install ffmpeg libavcodec-extra-53 lame libmp3lame0
|
- sudo aptitude -y -q install ffmpeg libavcodec-extra-53 lame libmp3lame0
|
||||||
|
@ -10,12 +11,10 @@ before_script:
|
||||||
# I've gone through 25 seperate commits to get it working.
|
# I've gone through 25 seperate commits to get it working.
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install coveralls # For coveralls.io
|
- python setup.py install
|
||||||
- pip install nose
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- python setup.py install
|
- python tests/album.py
|
||||||
- nosetests --with-coverage --cover-package=irs
|
- python tests/playlist.py
|
||||||
|
- python tests/post_processors.py
|
||||||
after_success:
|
- python tests/song.py
|
||||||
- coveralls
|
|
||||||
|
|
25
README.md
25
README.md
|
@ -7,7 +7,6 @@ Ironic Redistribution System
|
||||||
[![Stars](https://img.shields.io/github/stars/kepoorhampond/irs.svg?style=flat-square)](https://github.com/kepoorhampond/irs/stargazers)
|
[![Stars](https://img.shields.io/github/stars/kepoorhampond/irs.svg?style=flat-square)](https://github.com/kepoorhampond/irs/stargazers)
|
||||||
[![Build Status](https://img.shields.io/travis/kepoorhampond/irs/master.svg?style=flat-square)](https://travis-ci.org/kepoorhampond/irs)
|
[![Build Status](https://img.shields.io/travis/kepoorhampond/irs/master.svg?style=flat-square)](https://travis-ci.org/kepoorhampond/irs)
|
||||||
[![Say Thanks](https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square)](https://saythanks.io/to/kepoorhampond)
|
[![Say Thanks](https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square)](https://saythanks.io/to/kepoorhampond)
|
||||||
[![Coverage Status](http://img.shields.io/coveralls/kepoorhampond/irs.svg?style=flat-square)](https://coveralls.io/github/kepoorhampond/irs?branch=master&style=flat-square)
|
|
||||||
[![PyPI](https://img.shields.io/badge/pypi-irs-blue.svg?style=flat-square)](https://pypi.python.org/pypi/irs)
|
[![PyPI](https://img.shields.io/badge/pypi-irs-blue.svg?style=flat-square)](https://pypi.python.org/pypi/irs)
|
||||||
[![Beerpay](https://beerpay.io/kepoorhampond/irs/badge.svg?style=flat-square)](https://beerpay.io/kepoorhampond/irs)
|
[![Beerpay](https://beerpay.io/kepoorhampond/irs/badge.svg?style=flat-square)](https://beerpay.io/kepoorhampond/irs)
|
||||||
|
|
||||||
|
@ -19,8 +18,9 @@ A tool to download your music with metadata. It uses [Spotify](https://www.spoti
|
||||||
|
|
||||||
Works with Python 2 and 3.
|
Works with Python 2 and 3.
|
||||||
___
|
___
|
||||||
Demo and Usages
|
|
||||||
---
|
## Demo and Usages
|
||||||
|
|
||||||
This is a demo of the CLI displayling its features:
|
This is a demo of the CLI displayling its features:
|
||||||
[![demo](https://asciinema.org/a/105993.png)](https://asciinema.org/a/105993?autoplay=1)
|
[![demo](https://asciinema.org/a/105993.png)](https://asciinema.org/a/105993?autoplay=1)
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ $ irs -s "Bohemian Rhapsody"
|
||||||
$ irs -p "Best Nirvana"
|
$ irs -p "Best Nirvana"
|
||||||
```
|
```
|
||||||
|
|
||||||
Install & The Dependencies <sub><sup>(my new band name)</sub></sup>
|
## Install & The Dependencies <sub><sup>(my new band name)</sub></sup>
|
||||||
---
|
|
||||||
Really there's only one actual external dependency: `ffmpeg`. For windows, you'll want to follow [this](http://www.wikihow.com/Install-FFmpeg-on-Windows) guide. For OSX, you'll want to install it through [`brew`](https://brew.sh/) with this command:
|
Really there's only one actual external dependency: `ffmpeg`. For windows, you'll want to follow [this](http://www.wikihow.com/Install-FFmpeg-on-Windows) guide. For OSX, you'll want to install it through [`brew`](https://brew.sh/) with this command:
|
||||||
```
|
```
|
||||||
$ brew install ffmpeg
|
$ brew install ffmpeg
|
||||||
|
@ -73,8 +73,12 @@ Other than `ffmpeg` though, all other dependencies are automatically installed w
|
||||||
$ sudo pip install irs
|
$ sudo pip install irs
|
||||||
```
|
```
|
||||||
|
|
||||||
Metadata
|
## Spotify Playlists
|
||||||
---
|
|
||||||
|
To download spotify playlists, you'll want to head to their Dev Apps page, [here](https://developer.spotify.com/my-applications/). After doing that you'll want to create a new app. Name it whatever you want and then once you've done that, find the `Client ID` and `Client Secret` keys. You'll want to take those keys and paste them into your system's environment variables as `SPOTIFY_CLIENT_ID` and `SPOTIFY_CLIENT_SECRET`, correspondingly. Viola! You can now download playlists!
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
|
||||||
Currently, the program attaches the following metadata to the downloaded files:
|
Currently, the program attaches the following metadata to the downloaded files:
|
||||||
- Title
|
- Title
|
||||||
- Artist
|
- Artist
|
||||||
|
@ -85,16 +89,17 @@ Currently, the program attaches the following metadata to the downloaded files:
|
||||||
- Disc Number
|
- Disc Number
|
||||||
- Compilation (iTunes only)
|
- Compilation (iTunes only)
|
||||||
|
|
||||||
### Philosophy
|
## Philosophy
|
||||||
|
|
||||||
When I made this program I was pretty much broke and my music addiction wasn't really helping that problem. So, I did the obvious thing: make an uber-complicated program to ~~steal~~ download music for me! As for the name, its acronym spells IRS, which I found amusing, seeing as the IRS ~~takes~~ steals money while my program ~~gives~~ reimburses you with music.
|
When I made this program I was pretty much broke and my music addiction wasn't really helping that problem. So, I did the obvious thing: make an uber-complicated program to ~~steal~~ download music for me! As for the name, its acronym spells IRS, which I found amusing, seeing as the IRS ~~takes~~ steals money while my program ~~gives~~ reimburses you with music.
|
||||||
|
|
||||||
The design/style inspiration of pretty much everything goes to [k4m4](https://github.com/k4m4).
|
The design/style inspiration of pretty much everything goes to [k4m4](https://github.com/k4m4).
|
||||||
|
|
||||||
### Wishlist
|
## Wishlist
|
||||||
|
|
||||||
- [x] Full album downloading
|
- [x] Full album downloading
|
||||||
- [x] Album art metadata correctly displayed
|
- [x] Album art metadata correctly displayed
|
||||||
- [x] Spotify playlist downloading
|
- [x] Spotify playlist downloading
|
||||||
- [ ] GUI/Console interactive version - *in progress*
|
- [ ] GUI/Console interactive version - *in progress*
|
||||||
- [ ] Lyric metadata
|
- [ ] Lyric metadata
|
||||||
- [ ] 99% success rate for automatic song choosing
|
- [ ] 99% success rate for automatic song choosing
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,12 @@ directory to place files in.")
|
||||||
# Combiner args from argparse and the ripper_args as above and then
|
# Combiner args from argparse and the ripper_args as above and then
|
||||||
# remove all keys with the value of "None"
|
# remove all keys with the value of "None"
|
||||||
ripper_args.update(vars(args))
|
ripper_args.update(vars(args))
|
||||||
ripper_args = dict((k, v) for k, v in ripper_args.iteritems() if v)
|
|
||||||
|
# Python 2 and below uses list.iteritems() while Python 3 uses list.items()
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
ripper_args = dict((k, v) for k, v in ripper_args.items() if v)
|
||||||
|
elif sys.version_info[0] < 3:
|
||||||
|
ripper_args = dict((k, v) for k, v in ripper_args.iteritems() if v)
|
||||||
|
|
||||||
ripper = Ripper(ripper_args)
|
ripper = Ripper(ripper_args)
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,11 @@ with init, or in method arguments.")
|
||||||
list_of_lists = self.spotify.search(q=search, type="album")
|
list_of_lists = self.spotify.search(q=search, type="album")
|
||||||
list_of_lists = list_of_lists["albums"]["items"]
|
list_of_lists = list_of_lists["albums"]["items"]
|
||||||
elif type == "playlist":
|
elif type == "playlist":
|
||||||
list_of_lists = self.spotify.user_playlists(username)["items"]
|
try:
|
||||||
|
list_of_lists = self.spotify.user_playlists(username)["items"]
|
||||||
|
except spotipy.client.SpotifyException:
|
||||||
|
print("No user was found by that name.")
|
||||||
|
return False
|
||||||
|
|
||||||
if len(list_of_lists) > 0:
|
if len(list_of_lists) > 0:
|
||||||
the_list = None
|
the_list = None
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
from os import system, chdir
|
|
||||||
chdir("tests/")
|
|
||||||
|
|
||||||
system("python album.py")
|
|
||||||
system("python playlist.py")
|
|
||||||
system("python post_processors.py")
|
|
||||||
system("python song.py")
|
|
Loading…
Reference in a new issue