def handle(self, args): ingestor = MongoIngestor() if args.opml: ingestor = OPMLIngestor(args.opml) raise ConsoleError("opml ingestion is an untested utility!") if args.feeds: ingestor = Ingestor(args.feeds) raise ConsoleError("feed ingestion is an untested utility!") db.connect() ingestor.ingest() return ( "Processed {feeds} feeds ({timer}): " "{posts} posts with {errors} errors" ).format( timer=ingestor.timer, **ingestor.counts )
def handle(self, args): ingestor = MongoIngestor() if args.opml: ingestor = OPMLIngestor(args.opml) raise ConsoleError("opml ingestion is an untested utility!") if args.feeds: ingestor = Ingestor(args.feeds) raise ConsoleError("feed ingestion is an untested utility!") db.connect() ingestor.ingest() return ("Processed {feeds} feeds ({timer}): " "{posts} posts with {errors} errors").format( timer=ingestor.timer, **ingestor.counts)
def ingest(self, args): db.connect() ingestor = MongoIngestor() ingestor.ingest()