[WIP] Implement stackoverflow git service/package
Created by: leehambley
I took the first steps in implementing a StackOverflowExchange client in this branch to begin to address https://github.com/sourcegraph/sourcegraph/issues/423.
I have considered that a possible way to feed this machine would be to have the browser extension recognise StackExchange family URLs and forward them to this service, and have the service populate and track Git assets for those pages as quickly as possible, hence I have coded extremely defensively so far.
The README sketches out a little where I intend to take the solution, I plan to at least get as far as having this package create Git repositories containing the information extracted from StackExchange pages where a code block can be identified in the question or any of the answers. (subject to concerns such as identifying the language, etc)
I understand that the discussion in #423 talked about having the browser extension do this parsing and analysis since they already have the DOM and can avoid API rate limit constraints. I'm operating so far on the assumption that even if such a browser extension feature exists, something server-side should still refresh code samples (so we still need an API wrapper for SO/SE anyway) - and that even on the server-side, we can consider whether registering as an app, and/or talking with SO about increased rate limits would be feasible.
There's always the option to add a lot of TLS and borrow the user's auth token, if that would work? I would like to try that with my own tokens though before committing to anything.