Пример #1
0
def cmd_find(store, query):
    hits = store.index().search(query, count=30, date_sort=True,
    reverse=False)
    for strong_id in hits:
        msg = store.open_msg(strong_id)
        if not msg:  # HOW???
            continue
        print ('%s  %s  %-20.20s  %s' % (
            msg.date().date(),
            msg.strong_id(),
            msg.from_name() or msg.from_addr(),
            msg.subject()
        )).encode('utf-8')
Пример #2
0
def cmd_mutt(store, query):
    hits = store.index().search(query, count=30)
    hits = (store.open_msg(strong_id) for strong_id in hits)
    hits = (h for h in hits if h)
    run_mutt(hits)
Пример #3
0
def cmd_mbox(store, query):
    hits = store.index().search(query, count=100)
    for strong_id in hits:
        msg = store.open_msg(strong_id)
        if msg:
            mua.mboxrd.mbox_write(msg)