diff --git a/.gitignore b/.gitignore index 70c9047..d1f4466 100644 --- a/.gitignore +++ b/.gitignore @@ -4,13 +4,15 @@ pageopen.pyc songs.pyc wordsearch.pyc pagination.pyc +pygenius.egg-info/ __init__.pyc -setup.py src/README src/MANIFEST.in src/pygenius.egg-info src/build src/dist + .DS_Store *.swp +*.swo *~ diff --git a/README.md b/README.md index cfc2fbe..9a78159 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ OR If you download the source from here, please make sure you have BeautifulSoup installed (`pip install beautifulsoup4`). +Or, to install from source: + + $ cd src + $ python setup.py install + ###To import the library At the top of your script, include the following: @@ -22,6 +27,7 @@ At the top of your script, include the following: `from pygenius import artists, songs, wordsearch` + ###Functions currently available **artists.albumList(artist, arg)** Returns a list of albums that the specified artist has recorded. diff --git a/src/pygenius/pagination.py b/src/pygenius/pagination.py index 2a57c93..905911e 100644 --- a/src/pygenius/pagination.py +++ b/src/pygenius/pagination.py @@ -14,7 +14,7 @@ def openPage(artist): pages = pages.split('') pageLink = pages[len(pages) - 3] - pageLink = pageLink.replace('', '') - annotations.append('http://rapgenius.com/' + annotation) + annotations.append('http://' + annotation) else: annotations.append("Not annotated") @@ -100,7 +100,7 @@ def findAllSongs(artist, arg='songs'): newUrl = pagination.openPage(artist) songs = pagination.getSongs(newUrl) - + for song in songs: link = song[0] track = song[1] @@ -115,4 +115,4 @@ def findAllSongs(artist, arg='songs'): return tracks else: return songs - + diff --git a/src/setup.cfg b/src/setup.cfg new file mode 100644 index 0000000..04b1ff2 --- /dev/null +++ b/src/setup.cfg @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 diff --git a/src/setup.py b/src/setup.py new file mode 100644 index 0000000..aa97f42 --- /dev/null +++ b/src/setup.py @@ -0,0 +1,17 @@ +from setuptools import setup + +setup(name='pygenius', + version='2.0', + description='Python module for collecting data from rap songs.', + packages=['pygenius'], + author='Roopa Vasudevan', + author_email='roopa.vasudevan@gmail.com', + install_requires=[ + 'beautifulsoup4==4.1.3', + ], + classifiers=['Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: Education', + 'License :: Freely Distributable', + 'Natural Language :: English'] + )