예제 #1
0
파일: reddit.py 프로젝트: tsbertalan/HPI
def _get_state(bfile: Path) -> Dict[Sid, SaveWithDt]:
    logger.debug('handling %s', bfile)

    bdt = _get_bdate(bfile)

    saves = [SaveWithDt(save, bdt) for save in rexport.DAL([bfile]).saved()]
    return make_dict(
        sorted(saves, key=lambda p: p.save.created),
        key=lambda s: s.save.sid,
    )
예제 #2
0
파일: reddit.py 프로젝트: tsbertalan/HPI
def dal():
    # TODO lru cache? but be careful when it runs continuously
    return rexport.DAL(get_sources())
예제 #3
0
파일: reddit.py 프로젝트: alaq/HPI
def _dal() -> dal.DAL:
    inp = list(inputs())
    return dal.DAL(inp)
예제 #4
0
def dal() -> rexport.DAL:
    return rexport.DAL(inputs())
예제 #5
0
파일: reddit.py 프로젝트: thetomcraig/HPI
def _dal() -> dal.DAL:
    return dal.DAL(inputs())