Example #1
0
def pipe(test=False):
    s1 = SyncPipe('fetch', test=test, conf={'url': health}).output
    s2 = (SyncPipe('fetchpage', test=test,
                   conf=fetch_conf).strreplace(conf=replace_conf,
                                               assign='content').tokenizer(
                                                   conf={
                                                       'delimiter': ' '
                                                   },
                                                   emit=True).count().output)

    print(next(s1)['title'], next(s2)['count'])
Example #2
0
def pipe(test=False):
    s1, s2 = (SyncPipe(
        'input', test=test,
        **p385_kwargs).dateformat(conf=p405_conf).split().output)

    p393_kwargs = {'conf': p393_conf, 'date': s1, 'year': s2, 'test': test}
    stream = SyncPipe('itembuilder', **p393_kwargs).list

    for i in stream:
        pprint(i)

    return stream
Example #3
0
File: wired.py Project: tianhm/riko
def pipe(test=False):
    s1 = SyncPipe('input', test=test, **p120_kwargs).output
    s2 = (SyncPipe('input', conf=p112_conf,
                   test=test).dateformat(conf=p151_conf, format=s1).output)

    stream = (SyncPipe('itembuilder', conf=p100_conf, value=s2,
                       test=test).list)

    for i in stream:
        pprint(i)

    return stream
Example #4
0
def pipe(test=False):
    stream = (SyncPipe('itembuilder', conf=p1_conf,
                       test=test).regex(conf=p2_conf).list)

    for i in stream:
        pprint(str(i['url']))

    return stream
Example #5
0
def pipe(test=False):
    stream = (SyncPipe('itembuilder', conf=p232_conf, test=test)
        .strreplace(conf=p421_conf, field='author', assign='author')
        .list)

    for i in stream:
        pprint(i)

    return stream
Example #6
0
File: gigs.py Project: tianhm/riko
def pipe(test=False):
    stream = (SyncPipe('fetchdata', conf=p1_conf, test=test)
        .uniq(conf=p2_conf)
        .filter(conf=p3_conf)
        .sort(conf=p4_conf)
        .list)

    for i in stream:
        pprint(i)

    return stream
Example #7
0
def pipe(test=False):
    flow = SyncPipe('itembuilder', conf=ib_conf, test=test).hash()

    for i in flow.output:
        pprint(i)