view backend/couchdb/CouchDb.py @ 172:214addba1f93

always return an int value for daysToKeepFeedEntries
author dirk
date Fri, 09 Sep 2011 17:17:39 +0200
parents 91a24f499318
children d0ced79b5030
line wrap: on
line source


from argparse import ArgumentParser

database = "feedtest"

def init():
    parser = ArgumentParser()
    parser.add_argument("--dbname", nargs="?", help="Name of the database")
    args = parser.parse_known_args()
    dbname = args[0].dbname
    if dbname is not None:
        database = dbname

#
# accessor methods for the various views
#

def feedEntriesByFeed():
    return database + "/feedEntries_by_feed"

def unreadFeedEntriesByFeed():
    return database + "/unread_feedEntries_by_feed"

def feeds():
    return database + "/feeds"

def feedEntryByLink():
    return database + "/feedEntry_by_link"

def preference():
    return database + "/preference"