Ejemplo n.º 1
0
def _pipeline(pipeline_name):
    config = load_config()
    pipeline = config.pipeline[pipeline_name]
    subs = []
    for s in pipeline.subscribe:
        l = [(n, subscribe_services[s.service].get_title(n),
              subscribe_services[s.service].get_url(n))
             for n, channels in SubscribeSource.get_subs_by_channel(
                 *s.service, pipeline_name)]
        subss = subscribe_services[s.service]
        options = subss.options()
        subs.append((s.service[0].value, s.service[1], l, len(l), options))
    status = ItemInfo.count_status()
    return render_template('pipeline.jinja2',
                           pipeline_name=pipeline_name,
                           subs=subs,
                           status=status)
Ejemplo n.º 2
0
def _index():
    pipelines = load_config().pipeline.items()
    status = ItemInfo.count_status()
    return render_template('index.jinja2', pipelines=pipelines, status=status)