Esempio n. 1
0
def main():
    sfkit.open_db()
    scene_cnx = sfkit.open_scene()
    service_name = "yle-news"

    sfkit.add_source(fetch_callback = fetch_feed,
                     data_format = 'title+text',
                     refresh_period = 5*60,
                     name = service_name)

    # continue doing periodic data refresh
    sfkit.serve(scene_cnx, service_name)
Esempio n. 2
0
def main():
    logger.info("starting")
    sfkit.open_db()
    scene_cnx = sfkit.open_scene()
    service_name = "twitter"

    sfkit.add_source(fetch_callback = fetch_feed,
                     data_format = 'title+text',
                     refresh_period = 5*60,
                     name = service_name)

    # continue doing periodic data refresh
    logger.info("entering serve loop")
    sfkit.serve(scene_cnx, service_name)
    logger.info("finished")
Esempio n. 3
0
def main():
    print "starting"
    sfkit.open_db()
    scene_cnx = sfkit.open_scene()
    service_name = "twitter"

    creds = open("4sq-creds.txt").read().split()
    client = foursquare.Foursquare(client_id=creds[0], client_secret=creds[1], redirect_uri='http://chiru.cie.fi/no-such-thing')

    sfkit.add_source(fetch_callback = fetch_feed,
                     data_format = 'title+text',
                     refresh_period = 5*60,
                     name = service_name)

    # continue doing periodic data refresh
    print "entering serve loop"
    sfkit.serve(scene_cnx, service_name)
    print "finished"