示例#1
0
def get_first_and_last_date(db_root):
    source_names = get_all_provider_names(db_root)

    p = Provider(db_root, source_names[0])
    all_days = p.get_all_days()

    return utils.make_date_from_string(all_days[0]), utils.make_date_from_string(all_days[-1])
示例#2
0
def get_summary_from_last_update_for_all_sources(db_root):
    source_names = get_all_provider_names(db_root)

    last_update = list()
    for name in source_names:
        p = Provider(db_root, name)
        all_days = p.get_all_days()
        if all_days:
            last_day = utils.get_latest_day(all_days)

            summary = p.get_cached_metainfos_for_day(last_day)
            last_update.append((name, utils.make_date_from_string(last_day), summary))

    return last_update