incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elisiano Petrini <elisi...@gmail.com>
Subject Re: StackOverflow round-up (help needed!)
Date Mon, 11 Mar 2013 10:02:26 GMT
Hi,
   they do have an API ( https://api.stackexchange.com/docs/ ) but I
couldn't find an updated python library for it (py-stockexchange reads
1.1 API version whereas the latest is 2.1).

Nonetheless, their API return json data, hence you can very easily parse
it with python (or whatever other language supporting json).

To see the kind of json returned (or tune the query) you can visit
https://api.stackexchange.com/docs/search#order=desc&sort=creation&tagged=couchdb&filter=default&site=stackoverflow&run=true

This is a very simple example of how to put the pieces together in
python (far from being usable in production, but already useful to avoid
manual searches):

[elisiano@pc-elisiano ~/Projects ]$ cat couchdb_stack_overflow.py 
#!/usr/bin/env python2

import urllib2
from StringIO import StringIO
import gzip
import json

url="""https://api.stackexchange.com/2.1/search?order=desc&sort=creation&tagged=couchdb&site=stackoverflow"""

req=urllib2.Request(url)
req.add_header('Accept-Encoding', 'gzip') # should be the default

res=urllib2.urlopen(req)

buf=StringIO(res.read())
f=gzip.GzipFile(fileobj=buf)
data=json.loads(f.read())

### print only unanswered questions
for question in data['items']:
   if not question['is_answered']:
      print "%s => %s" % (question['title'], question['link'])



[elisiano@pc-elisiano ~/Projects ]$ ./couchdb_stack_overflow.py 
couchdb map/reduce view: counting only the most recent items =>
http://stackoverflow.com/questions/15320834/couchdb-map-reduce-view-counting-only-the-most-recent-items
couchDB sorting complex key =>
http://stackoverflow.com/questions/15259910/couchdb-sorting-complex-key
How to specify individual database location in couchdb? =>
http://stackoverflow.com/questions/15236632/how-to-specify-individual-database-location-in-couchdb
Query Ad-Hoc (Temporary‚Äč) Views with ektorp =>
http://stackoverflow.com/questions/15220020/query-ad-hoc-temporary-views-with-ektorp
Google closure on CouchDB =>
http://stackoverflow.com/questions/15212983/google-closure-on-couchdb
couchdb conflict identical document =>
http://stackoverflow.com/questions/15208208/couchdb-conflict-identical-document
What database(s) for storing user data, and also support targeting
queries? =>
http://stackoverflow.com/questions/15177068/what-databases-for-storing-user-data-and-also-support-targeting-queries
CouchDB Security in a Lightweight Stack? =>
http://stackoverflow.com/questions/15163643/couchdb-security-in-a-lightweight-stack
CouchDB: synchronize between slave databases =>
http://stackoverflow.com/questions/15159186/couchdb-synchronize-between-slave-databases
CouchDB &quot;virtual&quot; database, that combines 2 databases into 1
=>
http://stackoverflow.com/questions/15158869/couchdb-virtual-database-that-combines-2-databases-into-1
CouchDB didn&#39;t start in Windows XP? Anybody has same experince? =>
http://stackoverflow.com/questions/15142066/couchdb-didnt-start-in-windows-xp-anybody-has-same-experince
How to retrieve the couchDB data by given limit(start_limit,end_limit)
using cradle in node.js? =>
http://stackoverflow.com/questions/15105002/how-to-retrieve-the-couchdb-data-by-given-limitstart-limit-end-limit-using-cra






On Sat, 2013-03-09 at 11:08 -0800, Mark Hahn wrote:
> Is this automated?  If not then it should be.  I assume stackoverflow has
> an api.
> 
> 
> On Sat, Mar 9, 2013 at 6:17 AM, Noah Slater <nslater@apache.org> wrote:
> 
> > Dear community,
> >
> > Here are the latest StackOverflow questions about CouchDB. These might be a
> > good opportunity to earn some StackOverflow reputation and help out the
> > wider CouchDB community at the same time!
> >
> > CouchDB Security in a Lightweight Stack?
> >
> > http://stackoverflow.com/questions/15163643/couchdb-security-in-a-lightweight-stack
> >
> > CouchDB didn't start in Windows XP? Anybody has same experince? [closed]
> >
> > http://stackoverflow.com/questions/15142066/couchdb-didnt-start-in-windows-xp-anybody-has-same-experince
> >
> > Thanks,
> >
> > --
> > NS
> >



Mime
View raw message