Update Exploring Near Earth Objects project and add Meme Generator project

This commit is contained in:
2026-01-03 21:55:24 -08:00
parent 9a4c3f7854
commit 155f0c9c6d
36 changed files with 754 additions and 65 deletions

View File

@@ -0,0 +1,22 @@
"""Ingestor module to select appropriate ingestor based on file type."""
from typing import List
from .IngestorInterface import IngestorInterface
from .QuoteModel import QuoteModel
from .CSVIngestor import CSVIngestor
from .TextIngestor import TextIngestor
from .DocxIngestor import DocxIngestor
from .PDFIngestor import PDFIngestor
class Ingestor(IngestorInterface):
"""Subclass to select appropriate ingestor."""
ingestors = [CSVIngestor, TextIngestor, DocxIngestor, PDFIngestor]
@classmethod
def parse(cls, path: str) -> List[QuoteModel]:
"""Select the appropriate ingestor to parse the file."""
for ingestor in cls.ingestors:
if ingestor.can_ingest(path):
return ingestor.parse(path)