Enharmony is a library that provides functions to locate duplicate songs by performing a textual comparison of the songs' attributes.
- Python 3.3+
Enharmony can be installed with pip:
$ pip install enharmony
or directly from the source code:
$ git clone https://github.com/jacebrowning/enharmony.git
$ cd enharmony
$ python setup.py install
A sample script might look like this:
from enharmony import match, Song
items = [Song("The Beatles", "Rock and Roll Music"),
Song("Beatles", "rock & roll music"),
Song("The beetles", "Rock & Roll Music", duration=150),
Song("The Beatles", Rocky Raccoon")]
base = Song('beatles', 'rock and roll music', duration=150)
for item in match(base, items):
print(item)
- Make:
- Windows: http://cygwin.com/install.html
- Mac: https://developer.apple.com/xcode
- Linux: http://www.gnu.org/software/make (likely already installed)
- virtualenv: https://pypi.python.org/pypi/virtualenv#installation
- Pandoc: http://johnmacfarlane.net/pandoc/installing.html
- Graphviz: http://www.graphviz.org/Download.php
Create a virtualenv:
$ make env
Run the tests:
$ make test
$ make tests # includes integration tests
Build the documentation:
$ make doc
Run static analysis:
$ make pep8
$ make pep257
$ make pylint
$ make check # includes all checks
Prepare a release:
$ make dist # dry run
$ make upload