def main(): options = CadernosOptions() hbfauto = HbFileAuto(options.hbfilenames()) pe = PostExtractor(*hbfauto.hbfs) posts = pe.getPosts(options.startdate(), options.enddate()) for post in posts: print post
def getPostsFromHbFile(hbfilename, startDate, endDate): f = file(hbfilename) pe = PostExtractor(HbFile(f)) f.close() return pe.getPosts(startDate, endDate)