Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 15, 2022 05:19 am GMT

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

I'm a very lazy person, and always procrastinate on the smallest of things - opening the image editor, and making a good blog banner would always be the "extra" thing I had to do every time I wrote something. So, I made a script that generates them for me in milliseconds!

As Bill Gates says,

always choose a lazy person to do a difficult job because he will find an easy way to do it

The output is fully customizable, as it is 100% generated from code. You can change some values here and there, and boom! Generated. I ran it through all the posts of my blog and it quickly replaced many of the blog posts for me.

Check out the code Here (And the post if you liked it!)

GitHub logo Dhravya / blog-banner-generator

Customisable, fast, easy to use blog banner generator

Blog banner generator

I was tired of making banners for my blog posts, so I created a script that does it for me.

Example

Installation

git clone https://github.com/Dhravya/blog-banner-generator.gitcd blog-banner-generatorpip install -r requirements.txt

Config

The default config works well, but if you want your banner to be a different colour, or change the positioning of elements, feel free to edit the config file

Here are the config options (note that this may break the script, because I haven't tested it out much)

BG_COLOR : rgb(r, g, b)

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

TITLE_POSITION : Coordinates(x, y)

IMG_POSITION : Coordinates(x, y)

FOOTER_POSITION : Coordinates(x, y)

FOOTER : "<your small footer>"

Running the script

You can run the script by using the generate() method of the ImageFactory class

if __name__ == "__main__"    generator = ImageFactory()    generator.generate(        ... # Options here    )

Generate options:

title, description


Original Link: https://dev.to/dhravya/i-was-tired-of-making-banners-for-my-blogs-so-i-automated-it-5hnd

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To