Generate Memes which are a combination of quotes and images.
This is the module that handles ingesting quotes from various sources and creating new quotes.
An object that holds Quotes
The Ingestor
class implements the IngestorInterface
Abstract Base class and is a strategy object that determines what kind of Ingestor is needed based on the the passed file. The following types of Ingestors are supported
Parse and create a list of QuoteModels from PDF Files. Requires the pdftotext
command line utility to be installed.
body - author
Parse and create a list of QuoteModels from CSV Files.
Quotes should be in the format:
body, author
NOTE: the grading rubric suggests to use the Pandas CSV functionality, but since the project doesn't use any other Pandas functionality, I just used the csv
module which I think is more appropriate here
Parse and create a list of QuoteModels from Txt Files.
Quotes should be in the format:
body - author
Parse and create a list of QuoteModels from .docx files.
Quotes should be in the format:
body - author
This is the module that actually creates the memes by marrying the Quotes from the QuoteEngine and images. Generated Memes are saved to disk from where they can later be recalled.
QuoteEngine
and MemeEngine
are combined to create a meme generator. The meme generator can be used either as a command line utility or as a flask
application.
Provides a command line interface that allows users to pass paths to quotes and images which are used to create a meme.
To run the utility from the command line and see the latest documentation:
python3 meme.py --help
The Flask Application is contained in app.py
. Running this flask application creates a web interface for viewing random memes and allowing users to create their own memes.
To run the Flask app from the command line, Flask must be installed:
pip install Flask
Then run
export FLASK_APP=app
flask run
For more details, see the Flask Documentation