{"id":23451214,"url":"https://github.com/ctrlmaniac/meme-generator","last_synced_at":"2025-04-10T10:04:13.413Z","repository":{"id":38776525,"uuid":"506687621","full_name":"ctrlmaniac/meme-generator","owner":"ctrlmaniac","description":"A meme generator written in python and served as a command-line tool and with flask!","archived":false,"fork":false,"pushed_at":"2022-06-24T14:48:40.000Z","size":6421,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T19:48:50.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctrlmaniac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-23T15:08:32.000Z","updated_at":"2022-06-23T15:29:25.000Z","dependencies_parsed_at":"2022-09-17T12:51:59.330Z","dependency_job_id":null,"html_url":"https://github.com/ctrlmaniac/meme-generator","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlmaniac%2Fmeme-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlmaniac%2Fmeme-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlmaniac%2Fmeme-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlmaniac%2Fmeme-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrlmaniac","download_url":"https://codeload.github.com/ctrlmaniac/meme-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198878,"owners_count":21063627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T00:19:37.753Z","updated_at":"2025-04-10T10:04:13.382Z","avatar_url":"https://github.com/ctrlmaniac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meme-generator\n\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white)](https://conventionalcommits.org)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336)](https://pycqa.github.io/isort/)\n\nA meme generator written in python and served as a command-line tool and with flask!\n\n## Dependencies\n\nYou can check the dependencies list int the [pyproject.toml](./pyproject.toml) or in the [requirements.txt](requirements.txt)\n\nYou have to install **xpdf command-line tool**. Check out [here](https://www.xpdfreader.com/download.html) how to download and run xpdf.\n\nFor linux users: You don't have to install xpdf since it comes packaged with this repository!\n\nHere's a dependecies list:\n\n- python = \"^3.8\"\n- python-docx = \"^0.8.11\"\n- pandas = \"^1.4.3\"\n- Pillow = \"^9.1.1\"\n- requests = \"^2.28.0\"\n- Flask = \"^2.1.2\"\n\n### Poetry\n\nIf you use poetry just run `poetry install --no-dev` to install all dependencies.\nA virtual environment will be created and all dependencies will be installed.\n\n### Virtual Environment\n\nTo instantiate a virtual environment run the following commands:\n\n`python3 -m venv .venv`\n\nThis will create a virtual environment in the **.venv** folder\n\nRun `source ./venv/bin/activate` to activate the virtual environment.\n\nThen run `pip install -r requirements.txt` to install all dependencies.\n\n## How to run\n\nYou can either run the **meme-generator** via the command-line tool or by running flask.\n\n### Command-line instructions\n\nAfter installing and activate the virtual environment run the following command to generate a random meme:\n\n```\npython meme.py\n```\n\nYou can pass the following argumets:\n\n- path: a path to a file.\n- body: the body of the quote.\n- author: the author of the quote.\n\nyou can pass arguments with the double dash!\n\nExample:\n\n```\npython meme.py --body \"To be or not to be\" --author Shakespeare\n```\n\n### Browser\n\nAfter installing and activate the virtual environment run the following command to spawn a flask server:\n\n```\npython app.py\n```\n\nThis will create a link that you can click to inspect the meme generator via browser!\n\n## Modules\n\nHere you will find a description of all modules in this repository along with a brief description.\n\n### Ingestors\n\nThis module will ingest, open, read and parse multiple files of different type and will return a list of quotes contained in those files.\n\n#### CSVIngestor\n\nThis class will open, reand and parse a CSV file. It uses **pandas** to parse a CSV file.\nIt will return a list of quotes contained in the CSV file.\n\n#### DocxIngestor\n\nThis class will open, read and parse a DOCX file. It uses **python-docx** to parse the file into a list of quotes.\n\n#### PDFIngestor\n\nThis class will open, read and parse a PDF file. it uses **xpdf** to parse the file into a txt temporary file.\n\n#### TextIngestor\n\nThis class will open, read and parse a TXT file. It will return a list of quotes.\n\n#### Ingestor\n\nThis class will check the file extension of the given file and will pass the file to the right ingestor.\n\n#### IngestorInterface\n\nThis class is an interface that will act like a parent class for all ingestors sub-classes.\n\n### MemeEngine\n\nThis class will take a path to where the meme will be saved as an argument when instantiated.\nIf you call `make_meme` method on this class by passing the source image, the body of the quote and the author,\nit will generate a meme.\n\n### QuoteEngine\n\nThis class will represent a Quote. A Quote must contain a body and an author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlmaniac%2Fmeme-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrlmaniac%2Fmeme-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlmaniac%2Fmeme-generator/lists"}