Small service to automate the make up of your twitter profile, from 🐴 to 🦄 !
Based on a scheduler and Twitter API, you can change your profile at any day 📅 or any hour 🕒.
You can see it live on my Twitter profile 🐦
Clone the repository:
git clone git@github.com:nidup/twitter-makeup-service.git
Build the Docker image:
docker-compose build
Twitter Make Up allows to programmatically change your profile on your behalf.
To configure it, you need to generate Twitter credentials.
Follow the Twitter guide (OAuth 1.0a).
Then create a secrets.ini
file with your credentials in the config
folder:
[CREDENTIALS]
consumer_key = YourConsumerKey
consumer_secret = YourConsumerSecret
access_token = YourAccessToken
access_secret = YourAccessSecret
Drop your pictures in config/images
Edit the file makeup/scheduler.py, here are a few examples:
# status
schedule.every().day.at("07:30").do(change_display_name, name='Nicolas Dupont ☕')
schedule.every().day.at("08:30").do(change_display_name, name='Nicolas Dupont 💻')
schedule.every().day.at("13:39").do(change_display_name, name='Nicolas Dupont ☕')
schedule.every().day.at("13:55").do(change_display_name, name='Nicolas Dupont 💻')
schedule.every().day.at("19:00").do(change_display_name, name='Nicolas Dupont 📝')
# banner
schedule.every().day.at("06:30").do(change_banner_picture, path='config/images/banner-night.jpg')
schedule.every().day.at("21:00").do(change_banner_picture, path='config/images/banner-morning.jpg')
# profile
schedule.every().friday.at("18:30").do(change_profile_picture, path='config/images/profile-weekend.jpg')
schedule.every().monday.at("07:30").do(change_profile_picture, path='config/images/profile-week.jpg')
# description
week_description = "Co-founder and CPO at @akeneopim\
\n❤️ crafting products to create value for users and businesses\
\n💬 about #product, #engineering, #teamwork, #learnings"
weekend_description = "Co-founder and CPO at @akeneopim\
\n❤️ crafting products to create value for users and businesses\
\n💬 about #product, #engineering, #indiehacker"
schedule.every().friday.at("18:30").do(change_description, description=week_description)
schedule.every().monday.at("07:30").do(change_description, description=weekend_description)
I'll extract the scheduling configuration to make it easier to customize
docker-compose up
Starting twitter_makeup_cli ... done
Attaching to twitter_makeup_cli
twitter_makeup_cli | Launch the scheduler ⏲️
twitter_makeup_cli | Every 1 day at 07:30:00 do change_display_name(name='Nicolas Dupont ☕') (last run: [never], next run: 2020-05-03 07:30:00)
twitter_makeup_cli | Every 1 day at 08:30:00 do change_display_name(name='Nicolas Dupont 💻') (last run: [never], next run: 2020-05-03 08:30:00)
twitter_makeup_cli | Every 1 day at 13:39:00 do change_display_name(name='Nicolas Dupont ☕') (last run: [never], next run: 2020-05-03 13:39:00)
twitter_makeup_cli | Every 1 day at 06:30:00 do change_banner_picture(path='config/images/banner-night.jpg') (last run: [never], next run: 2020-05-03 06:30:00)
twitter_makeup_cli | Every 1 day at 21:00:00 do change_banner_picture(path='config/images/banner-morning.jpg') (last run: [never], next run: 2020-05-02 21:00:00)
twitter_makeup_cli | Every 1 week at 18:30:00 do change_profile_picture(path='config/images/profile-weekend.jpg') (last run: [never], next run: 2020-05-08 18:30:00)
twitter_makeup_cli | Every 1 week at 07:30:00 do change_profile_picture(path='config/images/profile-week.jpg') (last run: [never], next run: 2020-05-04 07:30:00)
twitter_makeup_cli | Current time = 14:04:47
twitter_makeup_cli | Profile name has been changed for "Nicolas Dupont ☕" 🦄
You can launch it as a dameon docker-compose up -d
The logs are stored into log/makeup.log
Be cautious with the Twitter API Rate Limits
This tool uses: