I was tired of making banners for my blogs, so I automated it

I am a really lazy individual, and all the time procrastinate on the smallest of issues – opening the picture editor, and making a very good weblog banner would all the time be the “additional” factor I needed to do each time I wrote one thing. So, I made a script that generates them for me in milliseconds!

As Invoice Gates says,

all the time select a lazy individual to do a tough job as a result of he’ll discover a straightforward solution to do it

The output is totally customizable, as it’s 100% generated from code. You may change some values right here and there, and growth! Generated. I ran it by way of all of the posts of my blog and it shortly changed most of the weblog posts for me.

Take a look at the code Here (And ⭐ the put up in case you appreciated it!)

Customisable, quick, straightforward to make use of weblog banner generator

I used to be uninterested in making banners for my weblog posts, so I created a script that does it for me.

Set up

git clone https://github.com/Dhravya/blog-banner-generator.git
cd blog-banner-generator
pip set up -r necessities.txt
Enter fullscreen mode

Exit fullscreen mode


The default config works nicely, however in order for you your banner to be a unique color, or change the positioning of components, be at liberty to edit the config file

Listed below are the config choices (word that this may increasingly break the script, as a result of I have never examined it out a lot)

BG_COLOR : rgb(r, g, b)

ART_POSITION : Coordinates(x, y, measurement=(430, 430))

TITLE_POSITION : Coordinates(x, y)

IMG_POSITION : Coordinates(x, y)

FOOTER_POSITION : Coordinates(x, y)

FOOTER : "<your small footer>"

Working the script

You may run the script by utilizing the generate() methodology of the ImageFactory class

if __name__ == "__main__"
    generator = ImageFactory()
        ... # Choices right here
Enter fullscreen mode

Exit fullscreen mode

Generate choices:

title, description

Add a Comment

Your email address will not be published. Required fields are marked *