{ "info": { "author": "Stephen Brennan", "author_email": "stephen@brennan.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Sound/Audio" ], "description": "tswift\n======\n\nThis repo is actually not directly related to Taylor Swift. It's just a simple\nPython API for getting lyrics from MetroLyrics. Here is how easy it is:\n\n.. code:: python\n\n from tswift import Artist\n import random\n\n tswift = Artist('Taylor Swift')\n song = random.choice(tswift.songs)\n print(song.format())\n\nSetup\n-----\n\nThis package depends on ``lxml``, ``requests``, and ``google``. These should be\ninstalled when you install this package from pip:\n\n.. code::\n\n pip install tswift\n\nAfter installing, you can also print a random Taylor Swift song lyric with the\ncommand:\n\n.. code::\n\n tswift\n\nCLI\n---\n\nThe module comes with a simple command line interface. By default, it will\ndisplay a random song by Taylor Swift. You can specify an artist like this:\n\n.. code::\n\n tswift 'Lynyrd Skynyrd'\n\nYou can choose a particular song:\n\n.. code::\n\n tswift 'Lynyrd Skynyrd' -s Freebird\n\nThere is also a \"lyric search mode\", which allows you to search for a song by\nlyrics, e.g.:\n\n.. code::\n\n tswift -l 'I would walk 500 miles'\n\n Im Gonna Be 500 Miles\n Proclaimers\n ---------------------\n\n When I wake up, well I know I'm gonna be,\n I'm gonna be the man who wakes up next you\n ...\n\nAPI\n---\n\nArtist class\n************\n\nThe constructor takes a single argument, the artist name. This name will be\n\"slugified\" in order to use it within URLs. This process involves replacing\nspaces with hyphens, and making everything lowercase. If this is not sufficient\nfor your particular artist, you'll need to provide a pre-slugified version of\ntheir name.\n\n- ``songs`` - a list of Song instances by this artist. This will call ``load()``\n if it hasn't been called yet\n- ``name`` - the artist's slugified name\n- ``load()`` - populates the ``songs`` list\n\nSong class\n**********\n\nThe constructor can be called in two ways. In the first, you provide a\nMetrolyrics URL, and the class will infer the artist and song title:\n\n.. code:: python\n\n s = Song(url='url here')\n\nIn the second way, you provide a title and artist, which will be slugified.\n\n.. code:: python\n\n s = Song('Taylor Swift', 'Love Story')\n\nThe attributes are:\n\n- ``lyrics`` - a string. Accessing this will call ``load()`` if not yet loaded\n- ``title`` - de-slugified title of song\n- ``artist`` - de-slugified artist name\n- ``load()`` - loads the lyrics\n- ``format()`` - returns the lyrics, with a header that includes the title and\n artist.\n\nThe static method ``Song.find_song(lyrics)`` takes a string with a search term,\nand performs a Google search. It returns a Song instance corresponding to the\nfirst Metrolyrics link it finds, stopping after 20 results. If nothing is found,\nreturns ``None``.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brenns10/tswift", "keywords": "lyrics metrolyrics scrape", "license": "Revised BSD", "maintainer": "", "maintainer_email": "", "name": "tswift", "package_url": "https://pypi.org/project/tswift/", "platform": "", "project_url": "https://pypi.org/project/tswift/", "project_urls": { "Homepage": "https://github.com/brenns10/tswift" }, "release_url": "https://pypi.org/project/tswift/0.5.0/", "requires_dist": [ "google (>=2.0)", "lxml", "requests" ], "requires_python": "", "summary": "MetroLyrics API", "version": "0.5.0" }, "last_serial": 3666659, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c93134f50ee93a4966409c98e40b2322", "sha256": "7e20e7ccddd4f52d1ad09a4700ada3240e16b863ad3fb41c982fdf22e06ddb41" }, "downloads": -1, "filename": "tswift-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c93134f50ee93a4966409c98e40b2322", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4384, "upload_time": "2015-08-19T16:32:19", "url": "https://files.pythonhosted.org/packages/06/81/4000bf7a233e94f4ecbea834d561f5c25ffce1716c0aa7a761434d641f02/tswift-0.1.0-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "bf1d0ac51bbd98cddbe3fc78e29f464f", "sha256": "3d2502a8d6dc44b89dd475f9b2cfe5246b572f5990a1cbf52f493ca0a1fcfe72" }, "downloads": -1, "filename": "tswift-0.2.0.tar.gz", "has_sig": false, "md5_digest": "bf1d0ac51bbd98cddbe3fc78e29f464f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3171, "upload_time": "2016-07-17T05:05:05", "url": "https://files.pythonhosted.org/packages/12/a4/fe2303523c9cef146f685409f62c8ce564210aefc348956bf6c64642d371/tswift-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d95c7d3c424422478ccbb5db420afbfb", "sha256": "d228d7cda6ddd6813ffc2b2eac34da12ff642ca15cbd3c3a02924860623ab287" }, "downloads": -1, "filename": "tswift-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d95c7d3c424422478ccbb5db420afbfb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7150, "upload_time": "2017-03-07T16:22:30", "url": "https://files.pythonhosted.org/packages/28/b3/40d895577746485f80231142058e4b96ac16305ee028188f09c17ecb0cfb/tswift-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac83277b445b8249d23cf64b8f19b187", "sha256": "e4c48850ff0af8787e06f86021862d190f8c9f8ffa1c79c2f8ca13fb47e87855" }, "downloads": -1, "filename": "tswift-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ac83277b445b8249d23cf64b8f19b187", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4858, "upload_time": "2017-03-07T16:22:31", "url": "https://files.pythonhosted.org/packages/d9/bb/f87d49bdf819fa5ed1ffe1bf891141529e95ac5acdeefd52a70b5befb5e7/tswift-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "6164d9c0ec2eb32e07e207ff49056df3", "sha256": "4edfaebc0e6256612499de12fe93c93204e38fecc44e7d41166137e1d6d636d9" }, "downloads": -1, "filename": "tswift-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6164d9c0ec2eb32e07e207ff49056df3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7160, "upload_time": "2017-08-17T06:28:25", "url": "https://files.pythonhosted.org/packages/7a/06/e7410426ee39b18d3b927b2000f3c2815378f97b881cc288212012d0f883/tswift-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60dc063dac31499ab635683bc1740a3a", "sha256": "b8a097dde177cd831fb9b926895e5083b5beb2adc6d20b1eaa5535afe301c2da" }, "downloads": -1, "filename": "tswift-0.4.0.tar.gz", "has_sig": false, "md5_digest": "60dc063dac31499ab635683bc1740a3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4789, "upload_time": "2017-08-17T06:28:31", "url": "https://files.pythonhosted.org/packages/6e/c1/54a077cc516c05130e977b8199f85f31d4ec6fa20c2537f1683ad8a14b40/tswift-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "041dcdf703a484d3b8e1ed16f55fd701", "sha256": "d9599e795351b4864447f86d9a52b7f63c31905809f98175a3829d3d7721d6c0" }, "downloads": -1, "filename": "tswift-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "041dcdf703a484d3b8e1ed16f55fd701", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7177, "upload_time": "2018-03-13T20:32:36", "url": "https://files.pythonhosted.org/packages/b9/3b/4e4745b17beb455da9a7ffc90d503016e470cd3129a110f36cab6113a24e/tswift-0.5.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "041dcdf703a484d3b8e1ed16f55fd701", "sha256": "d9599e795351b4864447f86d9a52b7f63c31905809f98175a3829d3d7721d6c0" }, "downloads": -1, "filename": "tswift-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "041dcdf703a484d3b8e1ed16f55fd701", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7177, "upload_time": "2018-03-13T20:32:36", "url": "https://files.pythonhosted.org/packages/b9/3b/4e4745b17beb455da9a7ffc90d503016e470cd3129a110f36cab6113a24e/tswift-0.5.0-py2.py3-none-any.whl" } ] }