GithubHelp home page GithubHelp logo

thejohnsub / musictools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kalbhor/musictools

0.0 0.0 0.0 161 KB

Python library to download, label and sort music files.

License: MIT License

Python 100.00%

musictools's Introduction

banner

PyPI version Build Status

Library to download, sort and tag music files

Social

GitHub stars GitHub followers
Twitter Follow

Dependencies

Mac

$ brew install libav

Ubuntu

$ sudo apt-get install libav-tools

Windows

Install libav

Installing

From Source:

$ git clone https://github.com/kalbhor/MusicTools
$ cd MusicTools
$ python setup.py install

From PyPI:

$ pip install musictools

Methods

Provides a list of youtube videos of the song with urls and titles
musictools.get_song_urls(song_name)
Download song from youtube
musictools.download_song(song_url, song_title)
Provides artist name, song name, album name and album art for a particular song. Requires Client ID and Client Secret for Spotify API
musictools.get_metadata(file_name, client_id, client_secret)
Adds an image as the album art of a mp3 file
musictools.add_albumart(file_name, albumart)
Adds title, artist and album name in a mp3 file
musictools.add_metadata(file_name, title, artist, album)
Removes all metadata and album art from songs
musictools.revert_metadata(file_name)
Returns specified metadata field for a music file
musictools.get_current_metadata_tag(file_name, tag)

Example

>>> from musictools import musictools

>>> songs_list = musictools.get_song_urls("Hey Jude")
>>> print(songs_list[0])
('https://www.youtube.com/watch?v=A_MjCqQoLLA', 'The Beatles - Hey Jude')

>>> url, title = songs_list[0]
>>> print(url)
https://www.youtube.com/watch?v=A_MjCqQoLLA
>>> print(title)
The Beatles - Hey Jude

>>> musictools.download_song(url, title, dl_directory='~/Desktop/Music/')

>>> musictools.get_metadata(title)
('The Beatles', '1 (Remastered)', 'Hey Jude - Remastered 2015', 'https://i.scdn.co/image/9ecfdf528562cae879748b73bd81b64dfa3d5704')

>>> artist, album , song_name, albumart = musictools.get_metadata(title, 'YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET')

>>> musictools.add_albumart(title, albumart)
>>> musictools.add_metadata(title, song_name, artist, album)

✨✨VOILA✨✨

image

Contributing

To contribute, post issues without hesitation and open pull requests to add/improve features.

License

musictools's People

Contributors

kalbhor avatar thejohnsub 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.