-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Python Featured Image Generator | ||
|
||
This repository contains Python scripts to generate featured images with custom titles and gradients. | ||
|
||
This Python tool generates featured images for WordPress posts quickly and efficiently. | ||
|
||
## Features | ||
|
||
- **Gradient Image Generation:** Utilizes a custom module to create complex gradient images. | ||
- **Title Overlay:** Adds formatted titles with customizable fonts and text effects. | ||
- **Bulk Generation:** Supports batch processing of titles from an input file to output featured images. | ||
- **Excel Output:** Outputs a summary Excel file with generated image filenames. | ||
|
||
|
||
## File Structure | ||
|
||
- **gen_featured_img.py**: Python script to generate featured images with customized titles and gradients. | ||
- **bulk_gen_featured.py**: Script to bulk generate featured images from a list of titles. | ||
- **gen_gradient_img.py**: Module for generating customizable gradient images. | ||
|
||
## Requirements | ||
|
||
- Python 3.x | ||
- Pillow library (`pip install Pillow`) | ||
- `slugify` library (`pip install python-slugify`) | ||
- OpenPyXL | ||
|
||
## Usage | ||
|
||
### Single Image Generation | ||
|
||
**gen_featured_img.py:** Generates a single featured image with a specified title. | ||
|
||
```bash | ||
python gen_featured_img.py | ||
``` | ||
|
||
Modify the title variable within the script for different titles. | ||
|
||
### Customization | ||
|
||
To customize image size, font, and other parameters: | ||
- **Image Size:** Modify the width and height variables in the generate_featured_image function in gen_featured_img.py. | ||
- **Font:** Change the font_path variable to point to your desired font file. Ensure the font file is accessible to the script. | ||
- **Additional Parameters:** Adjust other parameters such as max_font_size, min_font_size, text_color, shadow_color, and line_spacing in gen_featured_img.py to suit your requirements. | ||
|
||
### Bulk Image Generation: | ||
|
||
**bulk_gen_featured.py:** Generates featured images in bulk from a list of titles in input_title.txt. | ||
|
||
```bash | ||
python bulk_gen_featured.py | ||
``` | ||
|
||
Edit input_title.txt to include the desired titles for image generation. | ||
|
||
|
||
|
||
### Usage Notes | ||
Ensure the required fonts are installed and accessible to the script. | ||
Modify parameters and configurations directly in the scripts for customization. |