237
|
1 #!/usr/bin/env python
|
|
2
|
|
3 import couchdb
|
|
4
|
|
5 server = couchdb.Server('http://xanthippe:5984')
|
|
6 database = server['feedworm']
|
|
7
|
|
8 #result = database.view('feedworm/feeds_with_unread_entries', group=True)
|
|
9 #for entry in result:
|
|
10 ## print(entry.key)
|
|
11 # try:
|
|
12 # document = database[entry.key]
|
|
13 # except:
|
|
14 # print('no doc for feed {0}'.format(entry.key))
|
|
15
|
|
16 #feed = '326ab7561eaadee0773c88262906a0a4'
|
|
17 #result = database.view('feedworm/feedEntries_by_feed', startkey=[feed], endkey=[feed, {}])
|
|
18 #for row in result:
|
|
19 # #del database[row.id]
|
|
20 # print(row.id)
|
|
21
|
|
22 feed = '12cd35559a627cc7f4b43d213b24201d'
|
|
23 result = database.view('feedworm/feedEntries_by_feed', startkey=[feed], endkey=[feed, {}])
|
|
24 for row in result:
|
|
25 print(row)
|