Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
congtoan authored Jul 3, 2024
1 parent 77a954a commit 811a947
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
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.

0 comments on commit 811a947

Please sign in to comment.