コード例 #1
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)
コード例 #2
0
ファイル: ingest.py プロジェクト: lauralorenz/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()