Quran247 is an automated Python project designed to generate visually appealing JPEG/PNG images of random Quranic verses. The primary goal is to facilitate daily reminders and reflections by creating shareable content for social media platforms like Instagram. Future enhancements aim to include the Tafsir (exegesis) of the chosen verse, providing deeper understanding alongside the verse itself.
Here are a few examples of the JPEG images generated by Quran247:
| Sample 1 | Sample 2 |
|---|---|
![]() |
![]() |
| Sample 3 | Sample 4 |
|---|---|
![]() |
![]() |
- Random Verse Generation: Automatically selects a random Quranic verse.
- Image Overlay: Renders the selected verse onto a customizable background image.
- Social Media Ready Output: Generates images optimized for sharing on platforms like Instagram.
- Verse Identification: Includes the Surah name and verse number for context (e.g., "QURAN 29: AL-ANKABUT (THE SPIDER), VERSE 61").
- Automated Generation: Designed for potential scheduling and automated posting.
- [Planned] Tafsir Inclusion: Future development will integrate Tafsir for a comprehensive understanding of each verse.
- [Planned] Customizable fonts, background images, etc.
To get a local copy up and running, follow these simple steps.
- Python 3.x (Ensure you have Python installed on your system. You can download it from python.org).
-
Clone the repository:
git clone https://github.com/bheezpen/Quran247.git cd Quran247 -
Create a Virtual Environment: It's highly recommended to use a virtual environment to manage project dependencies. This isolates the project's dependencies from your system-wide Python packages.
python3 -m venv venv
-
Activate the Virtual Environment:
- On Windows:
.\venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install Project Dependencies: Once your virtual environment is activated, install the required packages using
pip:pip install -r requirements.txt
If you need to update the
requirements.txtlater, first activate your virtual environment, then run:pip freeze > requirements.txt
-
Run the main script: After setting up and installing dependencies, you can run the project:
python mainfile.py
A brief overview of the important files and directories:
mainfile.py: The main script that generates the Quranic verse images.requirements.txt: Lists all Python libraries required to run the project.font/: Contains font files used for rendering text on images.generated_images/: Where the generated JPEG images are saved.QuranArabic.txt: Contains Arabic Quranic verses.en_transliteration.txt: Contains English transliterations of Quranic verses.quran_chapters_surah.txt: Contains information about Quranic chapters/surahs.quran_simple_plain.txt: Another version of Quranic text.quranverses_eng.txt: English translations of Quranic verses.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Habeeblah A. O. Linkedin
Project Link: https://github.com/bheezpen/Quran247



