Skip to content

Python script using Twitter API to change user banner to see 100DaysOfCode process.

License

Notifications You must be signed in to change notification settings

Ingrid-E/RealTime-100DaysOfCode-TwitterBanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

100DaysOfCode - Automatic Banners 👩‍💻

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

image

Set Up

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

Original

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)
    image.save('img/banner.png')
    api.update_profile_banner('img/banner.png')

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

Follow me in twitter!

@Ingrid_E_

Dont forgive to give a ⭐

About

Python script using Twitter API to change user banner to see 100DaysOfCode process.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages