Giter VIP home page Giter VIP logo

samuraipolix / image-quote-generator Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 4.0 1.03 GB

Create high-quality images with quotes (Perfect for Instagram and Pinterest) in less than 5 seconds per 100+ images!

License: GNU General Public License v3.0

Python 100.00%
christian fitness image-generation image-generator image-processing python quote-generator quote-image quote-maker quote-to-image

image-quote-generator's Introduction

Python PayPal

Image Quotes Generator

This script creates high-quality image quotes, perfect for Instagram/Pinterest

in less than 5 seconds per 100+ images!

๐Ÿ“ท Examples

๐Ÿ“ Table of Contents

  1. About
  2. How it works
  3. How To Run
  4. Available Topics
  5. Built Using
  6. Final Results
  7. Note

๐Ÿง About

This is one of my first Python projects, hope you get the most out of it :)

I used it to sell Fitness and Christian quotes on Fiverr for a while.

๐Ÿ’ญ How it works

#1 Content

After choosing the topics I wanted, I got a list of quotes and a stock of 50+ background images - both related to the picked topic.

#2 Prepping

After getting enough images, I run those 2 functions:

helper.cut_images_new(): to crop the images to the desired dimensions.

helper.darken_images(): to darken the images so the text looks better.

#3 Editing

The script works by taking a background image from '/sources/images/{topic}' and a quote from the .txt file, and combining them into 1 photo.

I am using PILLOW to generate the text in different fonts and combine it with the background image.

All the images are copyright-free from stock footage websites, and the fonts are copyright-free as well.

๐Ÿ How to run

Follow the instructions given below to get this script up and running on your device.

  1. Download this repository as zip file / using git.
  2. Open the folder.
  3. Make sure all the required modules are installed. (pip install -r requirements.txt)
  4. Open main.py
  5. set the number of posts you want, your logo, and choose a topic (It can be one of the available topics, or you can add another one, how to is explained here)
TOPIC = "fitness"
SHOW_AUTHOR = True
CUSTOMER_NAME = "your_name"
NUM_OF_POSTS = 35
  1. RUN!
  2. And that's it! In about 5 seconds, you will have 100+ generated images!
  3. You can find your images in the generated/your_name/ directory.

๐Ÿ“‹ Available Topics

  1. Christian
  2. Fitness

To create a new topic, please follow these steps:

  1. Create a {topic}.txt file inside /sources/text_data
  2. Run "helper.create_new_topic_dirs(TOPIC, project_dir)" to auto create all the directories needed
  3. Add images to /sources/images/{topic}
  4. Run "helper.cut_images_new(images_folder, images_folder_cropped)" to crop the images to 1080 X 1350 (you can change the dimension inside the function)
  5. Run "helper.darken_images(images_folder_cropped, images_folder_cropped_darken)" if you want to make the images darker (it makes the text look better)

ANS THAT'S IT! :) Feel free to create a Pull Request if you want to help others as well!

โ›๏ธ Built Using

PILLOW - For generating text images

๐Ÿ“ท Final Results

After running the script you will get:

  1. The edited images.
  1. A spreadsheet containing the file names, quotes, and authors, to make it easier to find the image you want.

๐Ÿ—’๏ธ Note

Note that this script is very basic as of now. If you want to contribute, you are free to do so and you may even fork and improve this repository.

image-quote-generator's People

Contributors

samuraipolix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.