lukasschwab / stackit

StackOverflow queries from the command line
MIT License
314 stars 28 forks source link

Added response when search query returns no SO items #5

Closed grobbie94 closed 9 years ago

grobbie94 commented 9 years ago

Currently, stackit exits when search returns no stack overflow responses. This just adds functionality to either launch browser into stack overflow, search again with new/edited terms or exit the program.

The os.system call to return to search isn't great, but any other way I could think of required complete restructure.

I'm pretty new to this, so feel free to be as critical as you want.

Thanks, Rob

lukasschwab commented 9 years ago

Rob:

Thanks so much for the pull request! Several of us (me included) are super new to this too. I made some line comments in your code, and we'd love to see those changes in a new commit!

We agree that there should be some way to handle result-less queries, but I'm not sure the best way to handle that is to drop the user into an interface (the one you've created) that tries to recreate the functionality at the command line––that seems to be two ways to do functionally the same thing, start from scratch.

Additionally, because it bypasses the command line parsing process, dropping the user into such an interface could lose some functionality (such as tags or stderr piping) when you remove the messy os.system() call.

This is something we'll talk about as a team, and get back to you ASAP!

Just some brainstorming:

Thanks again!

lukasschwab commented 9 years ago

@grobbie94 I just merged in another pull request, which means you're also going to have to rebase onto master. Just a heads up!

grobbie94 commented 9 years ago

Hey Lukas,

Removed the option to 're-search' with new terms, that does indeed take away some of the main functionality of piping in errors.

Now, a warning comes up with the search terms used. If the user wants to enter the browser, it directs to stackoverflow with the search completed so it can be easily altered.

lukasschwab commented 9 years ago

@grobbie94 something about your git rebase seems a bit odd–-see the 'Files Changed' tab on this pull request.

The master code has changed quite a bit since this pull request was opened, including major refactoring, which I think would make the continued modification of this pull request tricky. My suggestion is that you watch PR 9: Refactoring, re-branch when that pull request is merged, and then re-implement your functionality.

If you aren't liking this, I'd be happy to implement it myself and give you credit for this pull request conversation in README.md.

Just let me know!

grobbie94 commented 9 years ago

@lukasschwab I haven't been watching very closely. I'll re fork it and add it in.

Thanks,

Rob