Update Meme Generator project

This commit is contained in:
2026-01-04 14:03:10 -08:00
parent 155f0c9c6d
commit 433f2ba034
9 changed files with 66 additions and 28 deletions

View File

@@ -19,5 +19,6 @@ class IngestorInterface(ABC):
@classmethod
@abstractmethod
def parse(cls, path: str) -> List[QuoteModel]:
"""Abstract method to parse the file and return a list of QuoteModel objects."""
"""Abstract method to parse the file and return a list of QuoteModel
objects."""
pass

View File

@@ -23,7 +23,7 @@ class PDFIngestor(IngestorInterface):
tmp = f"./tmp/{random.randint(0, 10000)}.txt"
try:
# pdftotext <input-pdf> <output-text-file>
call = subprocess.call(["pdftotext", path, tmp])
subprocess.call(["pdftotext", path, tmp])
with open(tmp, "r") as file:
lines = file.readlines()
except FileNotFoundError as err:

View File

@@ -10,5 +10,5 @@ class QuoteModel:
self.author = author
def __repr__(self):
"""String representation of the QuoteModel object."""
"""Return a string representation of the QuoteModel."""
return f"{self.body} - {self.author}"

View File

@@ -1,3 +1,8 @@
"""QuoteEngine package.
Provides tools for parsing and representing quote data.
"""
from .IngestorInterface import IngestorInterface
from .CSVIngestor import CSVIngestor
from .DocxIngestor import DocxIngestor