{"id":13910625,"url":"https://github.com/sb-haz/twitter-wrapped","last_synced_at":"2025-07-18T09:32:10.248Z","repository":{"id":114087323,"uuid":"434070532","full_name":"sb-haz/twitter-wrapped","owner":"sb-haz","description":"Brings the Spotify Wrapped concept to Twitter.","archived":false,"fork":false,"pushed_at":"2022-01-17T06:38:49.000Z","size":7097,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-08T00:43:50.011Z","etag":null,"topics":["pillow","python","sentiment-analysis","streaming-data","tweepy","twitter","twitterapi","twitterbot"],"latest_commit_sha":null,"homepage":"https://twitter.com/tweetwrapped","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sb-haz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-02T03:36:09.000Z","updated_at":"2022-12-23T18:34:50.000Z","dependencies_parsed_at":"2024-02-09T05:33:46.524Z","dependency_job_id":null,"html_url":"https://github.com/sb-haz/twitter-wrapped","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-haz%2Ftwitter-wrapped","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-haz%2Ftwitter-wrapped/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-haz%2Ftwitter-wrapped/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-haz%2Ftwitter-wrapped/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sb-haz","download_url":"https://codeload.github.com/sb-haz/twitter-wrapped/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226388667,"owners_count":17617316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pillow","python","sentiment-analysis","streaming-data","tweepy","twitter","twitterapi","twitterbot"],"created_at":"2024-08-07T00:01:38.831Z","updated_at":"2024-11-25T19:31:26.737Z","avatar_url":"https://github.com/sb-haz.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"﻿# Twitter Wrapped Bot\r\nThis project brings the popular [Spotify Wrapped](https://newsroom.spotify.com/2021-12-01/the-wait-is-over-your-spotify-2021-wrapped-is-here/) concept to Twitter.\r\n\r\nTwo main files used in this project:\r\n- `stream_mentions.py`\r\nThis file is responsible for authenticating with the Twitter API and streaming real-time bot mentions.\r\n- `generate_image.py`\r\nThis file is used to generate visuals that include the user's statistics.\r\n\r\n\r\n# Live Demo\r\nYou can find the bot on Twitter running this code on [Twitter.com/TweetWrapped](https://www.twitter.com/tweetwrapped).\r\nThe account now has more than 100,000 followers!\r\n\r\n\r\n# Statistics Generated\r\n- Most liked tweet.\r\n- Most retweeted tweet.\r\n- Most quoted tweet.\r\n- Word-Cloud of frequently used words in tweets.\r\n- The number of tweets that have received more than 100, 500, 1,000, or 10,000 likes.\r\n- Sentiment analysis of tweets.\r\n\r\n\r\n# Example\r\n\u003cimg src=\"https://i.imgur.com/IRqGRui.png\" alt=\"Tweet Wrapped Examples\" width=\"750\" height=\"750\"\u003e\r\n\r\n# How To Run\r\n1. Clone this repository\r\n2. Apply for a Twitter Developer account\r\n3. Create a new file `twitter_credentials.py`\r\n4. Add your authentication tokens\r\n```\r\nbearer_token = \"XXXXXX\"\r\nconsumer_key = \"XXXXXX\"\r\nconsumer_secret = \"XXXXXX\"\r\naccess_token = \"XXXXXX\"\r\naccess_token_secret = \"XXXXXX\"\r\n```\r\n5. Run `stream_mentions.py`\r\n\r\n# Optional\r\nThe following folders/files can be deleted without affecting the program's functionality:\r\n- `old/python_api_calls`\r\n- `old/alternative_to_streaming.py`\r\n- `old/file_queue_test.py`\r\n- `old/queue_test.txt`\r\n- `old/two_image_format.py`\r\n\r\nYou can also choose not to stream mentions live and instead create wrapped images for a single user. To do so, follow these steps:\r\n1. Open `generate_image.py`.\r\n2. Scroll down to the bottom of the page and paste the code below:\r\n```\r\nif __name__ == \"__main__\":\r\n    main(sys.argv[1])\r\n```\r\n3. Replace USERNAME with your Twitter username and run the following command in terminal:\r\n`python .\\generate_image.py USERNAME`\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-haz%2Ftwitter-wrapped","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsb-haz%2Ftwitter-wrapped","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-haz%2Ftwitter-wrapped/lists"}