mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Prepare for releases
This commit is contained in:
110
.gitignore
vendored
110
.gitignore
vendored
@@ -1,9 +1,111 @@
|
||||
config.yml
|
||||
Music/
|
||||
*.txt
|
||||
.coverage
|
||||
|
||||
*.pyc
|
||||
__pycache__/
|
||||
.cache/
|
||||
README.rst
|
||||
upload.sh
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
.static_storage/
|
||||
.media/
|
||||
local_settings.py
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
13
CHANGES.md
Normal file
13
CHANGES.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## 1.0.0-alpha.1 - 2018-02-02
|
||||
### Added
|
||||
- Initial release, prepare for 1.0.0
|
||||
|
||||
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0-alpha.1...HEAD
|
||||
36
README.md
36
README.md
@@ -38,26 +38,31 @@ If you need to use Python 2 though, check out the (old) `python2` branch.
|
||||
since they were not of much use and created unnecessary clutter.
|
||||
You can still get them back by using `old` branch though.
|
||||
|
||||
### Debian, Ubuntu, Linux & Mac
|
||||
### Debian-like GNU/Linux & macOS
|
||||
|
||||
```
|
||||
$ cd
|
||||
$ git clone https://github.com/ritiek/spotify-downloader
|
||||
$ cd spotify-downloader
|
||||
$ pip install -U -r requirements.txt
|
||||
$ pip install spotify-downloader
|
||||
```
|
||||
|
||||
**Important:** if you have installed both Python 2 and 3, the `pip` command
|
||||
could invoke an installation for Python 2. To see which Python version `pip`
|
||||
refers to, try `$ pip -V`. If it turns out `pip` is your Python 2 pip, try
|
||||
`$ pip3 install -U -r requirements.txt` instead.
|
||||
`$ pip3 install spotify-downloader` instead.
|
||||
|
||||
You'll also need to install FFmpeg for conversion
|
||||
(use `--avconv` if you'd like to use that instead):
|
||||
|
||||
Linux: `$ sudo apt-get install ffmpeg`
|
||||
GNU/Linux:
|
||||
|
||||
Mac: `$ brew install ffmpeg --with-libmp3lame --with-libass --with-opus --with-fdk-aac`
|
||||
```
|
||||
$ sudo apt-get install ffmpeg
|
||||
```
|
||||
|
||||
macOS:
|
||||
|
||||
```
|
||||
$ brew install ffmpeg --with-libmp3lame --with-libass --with-opus --with-fdk-aac
|
||||
```
|
||||
|
||||
If it does not install correctly, you may have to build it from source.
|
||||
For more info see https://trac.ffmpeg.org/wiki/CompilationGuide.
|
||||
@@ -65,18 +70,21 @@ For more info see https://trac.ffmpeg.org/wiki/CompilationGuide.
|
||||
### Windows
|
||||
|
||||
Assuming you have Python 3
|
||||
([preferably v3.6 or above to stay away from Unicode errors](https://stackoverflow.com/questions/30539882/whats-the-deal-with-python-3-4-unicode-different-languages-and-windows)) already installed and in PATH.
|
||||
|
||||
- Download and extract the [zip file](https://github.com/ritiek/spotify-downloader/archive/master.zip)
|
||||
from master branch.
|
||||
([preferably v3.6 or above to stay away from Unicode errors](https://stackoverflow.com/questions/30539882/whats-the-deal-with-python-3-4-unicode-different-languages-and-windows)) and pip already installed and in PATH.
|
||||
|
||||
- Download FFmpeg for Windows from [here](http://ffmpeg.zeranoe.com/builds/).
|
||||
Copy `ffmpeg.exe` from `ffmpeg-xxx-winxx-static\bin\ffmpeg.exe` to PATH
|
||||
(usually C:\Windows\System32\) or just place it in the root directory extracted
|
||||
from the above step.
|
||||
|
||||
- Open `cmd` and type `$ pip install -U -r requirements.txt` to install dependencies.
|
||||
The same note about `pip` as for Debian, Ubuntu, Linux & Mac applies.
|
||||
- Open `cmd` and type `pip install spotify-downloader`.
|
||||
The same note about `pip` as for GNU/Linux and macOS applies.
|
||||
|
||||
### From GitHub releases
|
||||
|
||||
- Download and extract the [latest](https://github.com/ritiek/spotify-downloader/releases/latest) or a [specific](https://github.com/ritiek/spotify-downloader/releases/latest) release archive file.
|
||||
|
||||
- `cd` into the directory and `python3 setup.py install`
|
||||
|
||||
## Instructions for Downloading Songs
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
pathlib >= 1.0.1
|
||||
youtube_dl >= 2017.5.1
|
||||
pafy >= 0.5.3.1
|
||||
spotipy >= 2.4.4
|
||||
mutagen >= 1.37
|
||||
unicode-slugify >= 0.1.3
|
||||
titlecase >= 0.10.0
|
||||
logzero >= 1.3.1
|
||||
lyricwikia >= 0.1.8
|
||||
PyYAML >= 3.12
|
||||
53
setup.py
Normal file
53
setup.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from setuptools import setup
|
||||
from spotdl import __version__
|
||||
|
||||
# Created from README.md using pandoc
|
||||
with open('README.rst', 'r') as f:
|
||||
long_description = f.read()
|
||||
|
||||
setup(
|
||||
name='spotify-downloader',
|
||||
py_modules=['spotdl'],
|
||||
# Tests are included automatically:
|
||||
# https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute
|
||||
packages=['core'],
|
||||
version=__version__,
|
||||
install_requires=[
|
||||
'pathlib >= 1.0.1',
|
||||
'youtube_dl >= 2017.5.1',
|
||||
'pafy >= 0.5.3.1',
|
||||
'spotipy >= 2.4.4',
|
||||
'mutagen >= 1.37',
|
||||
'unicode-slugify >= 0.1.3',
|
||||
'titlecase >= 0.10.0',
|
||||
'logzero >= 1.3.1',
|
||||
'lyricwikia >= 0.1.8',
|
||||
'PyYAML >= 3.12'
|
||||
],
|
||||
description='Download songs from YouTube using Spotify song URLs or playlists with albumart and meta-tags.',
|
||||
long_description=long_description,
|
||||
author='Ritiek Malhotra and the spotify-downloader contributors',
|
||||
license='MIT',
|
||||
url='https://github.com/ritiek/spotify-downloader',
|
||||
download_url='https://pypi.org/project/spotify-downloader/',
|
||||
keywords=['spotify', 'downloader', 'download', 'music', 'youtube', 'mp3', 'album', 'metadata'],
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: End Users/Desktop',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Topic :: Multimedia',
|
||||
'Topic :: Multimedia :: Sound/Audio',
|
||||
'Topic :: Utilities'
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'spotdl = spotdl:cli',
|
||||
],
|
||||
}
|
||||
)
|
||||
@@ -16,6 +16,8 @@ import time
|
||||
import platform
|
||||
import pprint
|
||||
|
||||
__version__ = '1.0.0b1'
|
||||
|
||||
|
||||
def check_exists(music_file, raw_song, meta_tags):
|
||||
""" Check if the input song already exists in the given folder. """
|
||||
@@ -167,12 +169,13 @@ def download_single(raw_song, number=None):
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
const.args = handle.get_arguments()
|
||||
internals.filter_path(const.args.folder)
|
||||
|
||||
const.log = const.logzero.setup_logger(formatter=const.formatter,
|
||||
level=const.args.log_level)
|
||||
global log
|
||||
log = const.log
|
||||
log.debug('Python version: {}'.format(sys.version))
|
||||
log.debug('Platform: {}'.format(platform.platform()))
|
||||
@@ -197,3 +200,7 @@ if __name__ == '__main__':
|
||||
except KeyboardInterrupt as e:
|
||||
log.exception(e)
|
||||
sys.exit(3)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user