# HG changeset patch # User Dirk Olmes # Date 1429927812 -7200 # Node ID a15b3ee791a1163b5e5f0ed82e42e80c54470a0f # Parent 5bbb1e707e56542b7b38f21282c33e34e1bdcce6# Parent 6a3e3a0a7efe518d05d7f65e7b30042cd9814e77 Automated merge with https://xanthippe.duckdns.org/hg/Feedworm diff -r 6a3e3a0a7efe -r a15b3ee791a1 backend/couchdb/scripts/findUnlinkedArticles.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/backend/couchdb/scripts/findUnlinkedArticles.py Sat Apr 25 04:10:12 2015 +0200 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import couchdb + +server = couchdb.Server('http://xanthippe:5984') +database = server['feedworm'] + +#result = database.view('feedworm/feeds_with_unread_entries', group=True) +#for entry in result: +## print(entry.key) +# try: +# document = database[entry.key] +# except: +# print('no doc for feed {0}'.format(entry.key)) + +#feed = '326ab7561eaadee0773c88262906a0a4' +#result = database.view('feedworm/feedEntries_by_feed', startkey=[feed], endkey=[feed, {}]) +#for row in result: +# #del database[row.id] +# print(row.id) + +feed = '12cd35559a627cc7f4b43d213b24201d' +result = database.view('feedworm/feedEntries_by_feed', startkey=[feed], endkey=[feed, {}]) +for row in result: + print(row)