예제 #1
0
    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
        )
예제 #2
0
파일: ingest.py 프로젝트: youurt/baleen
    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)
예제 #3
0
파일: run.py 프로젝트: youurt/baleen
 def ingest(self, args):
     db.connect()
     ingestor = MongoIngestor()
     ingestor.ingest()