100DaysOfCode - Automatic Banners

Adds a number to your twitter banner indicating the number of days you have in the #100DaysOfCode challenge


Set Up

Create a banner picture with a space for the numbers to be at.

Change x and y position where the number will be drawn.

def draw_number(x,y):
    image = Image.open('img/Original_TwitterBanner.png')
    draw = ImageDraw.Draw(image)
    # Position to center text if number has less then 3 digits
    position = 50/len(str(days)) if len(str(days)) < 3 else 0
    draw.text(xy=(x+position,y),text=str(days), fill=(35,35,35), font=font_type)

In main add your information

    username = ""
    cKey = ""
    cSecrete = ""
    aToken = ""
    aSecrete = ""

To get the Twitter Tokens you need to apply for a Twitter Developer account https://developer.twitter.com/

When your done you just run the script, and keep it running!

> python 100-Banners.py
GitHub - Ingrid-E/RealTime-100DaysOfCode-TwitterBanner at pythonawesome.com
Python script using Twitter API to change user banner to see 100DaysOfCode process. - GitHub - Ingrid-E/RealTime-100DaysOfCode-TwitterBanner at pythonawesome.com