New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song searching #7

Merged
merged 3 commits into from Aug 29, 2013

Conversation

Projects
None yet
3 participants
@rspeicher
Contributor

rspeicher commented Aug 26, 2013

Here it is. Closes #1

I like how you can take a search result and right away call description, annotations, etc. on it and it'll just fetch the data as-needed. Nice, clean interface.

There is one hack-ish thing I had to do that I hate that I'll make a line comment on, if anyone has a better way I'd appreciate it.

results.split("\n").map do |song|
info, link, id = song.split('|')
artist, title = info.force_encoding('UTF-8').split('')

This comment has been minimized.

@rspeicher

rspeicher Aug 26, 2013

Contributor

So gross.

@rspeicher

rspeicher Aug 26, 2013

Contributor

So gross.

This comment has been minimized.

@timrogers

timrogers Aug 29, 2013

Owner

Hah, damn Rap Genius and their crazy UTF-8 characters. Ruby seems to be a bit of a pain for handling it though...

@timrogers

timrogers Aug 29, 2013

Owner

Hah, damn Rap Genius and their crazy UTF-8 characters. Ruby seems to be a bit of a pain for handling it though...

@timrogers

This comment has been minimized.

Show comment
Hide comment
@timrogers

timrogers Aug 29, 2013

Owner

Awesome work @tsigo - working well, though it's a bit slow. Nokogiri has a lot to parse!

I too really love the lazy-loading of data - in some respects it's more of an imposed requirement from the need to parse lots of big pages that how I would have designed it, but it's actually quite nice as keeps things fast(ish).

Merging and releasing now. 👍 Do you have any plans for further stuff? :)

Owner

timrogers commented Aug 29, 2013

Awesome work @tsigo - working well, though it's a bit slow. Nokogiri has a lot to parse!

I too really love the lazy-loading of data - in some respects it's more of an imposed requirement from the need to parse lots of big pages that how I would have designed it, but it's actually quite nice as keeps things fast(ish).

Merging and releasing now. 👍 Do you have any plans for further stuff? :)

timrogers pushed a commit that referenced this pull request Aug 29, 2013

@timrogers timrogers merged commit cc35c3c into timrogers:master Aug 29, 2013

@paulyoung

This comment has been minimized.

Show comment
Hide comment
@paulyoung

paulyoung commented Aug 29, 2013

👍

@rspeicher rspeicher deleted the rspeicher:song_search branch Aug 29, 2013

@rspeicher

This comment has been minimized.

Show comment
Hide comment
@rspeicher

rspeicher Aug 29, 2013

Contributor

@paulyoung Looking forward to seeing what you'll build!

Contributor

rspeicher commented Aug 29, 2013

@paulyoung Looking forward to seeing what you'll build!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment