Tuesday, December 18, 2012

Latest Project: Lyric Miner

    Towards the end of this past semester, I decided to build a "data miner" in Python, that would contain tools for gathering information from the web. Though I don't have a set direction for where I would like it to go, I did build the first tool: a lyric miner called "LyricThief." My only goal for LT was to simplify the process of Googling lyrics and all that that entails. So, here's what it looks like (please forgive my Linux desktop's matrix-esque windowing):



    As you can see, all it needs is the artist and the song title then viola! It will search a list of sources and bring up the lyrics in this screen:


    From here you can read, edit or save lyrics to a text file.

    As it stands right now, adding sources (or removing them) is easy. All they require is a method to generate what the URL looks like for the site (most lyric sites have a predictable URL format) and a method to parse the URL (I usually do this in 2-4 lines of obfuscated Python code, I know, it's bad). Then, once the source is complete, they are added to the builder and it takes care of the rest.

    Although I haven't tested it in Windows, it should work if Python 2.7 and  PyGTK are installed. In Linux, however, these things are included with most modern distros by default.

All code is on my github.

No comments:

Post a Comment