{"id":19589741,"url":"https://github.com/dhaitz/twitter-bot","last_synced_at":"2025-04-27T12:32:58.274Z","repository":{"id":80217640,"uuid":"261578224","full_name":"dhaitz/twitter-bot","owner":"dhaitz","description":"Twitter bot, regularly tweeting one line from a text file","archived":false,"fork":false,"pushed_at":"2020-05-10T19:58:48.000Z","size":37,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T00:25:38.844Z","etag":null,"topics":["heroku","python","travis-ci","twitter","twitter-api","twitter-bot"],"latest_commit_sha":null,"homepage":"https://twitter.com/cog_biased","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/dhaitz.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,"publiccode":null,"codemeta":null}},"created_at":"2020-05-05T20:40:01.000Z","updated_at":"2022-09-02T18:01:13.000Z","dependencies_parsed_at":"2023-04-24T12:24:27.352Z","dependency_job_id":null,"html_url":"https://github.com/dhaitz/twitter-bot","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/dhaitz%2Ftwitter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhaitz%2Ftwitter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhaitz%2Ftwitter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhaitz%2Ftwitter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhaitz","download_url":"https://codeload.github.com/dhaitz/twitter-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251138933,"owners_count":21541976,"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":["heroku","python","travis-ci","twitter","twitter-api","twitter-bot"],"created_at":"2024-11-11T08:20:31.266Z","updated_at":"2025-04-27T12:32:58.264Z","avatar_url":"https://github.com/dhaitz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Bot \n\n[![Build Status](https://travis-ci.com/dhaitz/twitter-bot.svg?token=dNDGtapxsNESrm54LMG7\u0026branch=master)](https://travis-ci.com/dhaitz/twitter-bot)\n[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)\n\nA bot that tweets from a txt file.\nWritten in Python, deployment via Travis-CI to Heroku.\nInspired by [heroku-twitter-bot](https://emcain.github.io/heroku-twitter-bot/).\n\n\n\n## How it works\nThe file `tweets.txt` is read in (and optionally shuffled).\nEvery line becomes a tweet (long lines are split into tweet threads).\n\nTweeting starts when the bot starts running or at a certain time of the day, depending on whether the `START_HOUR` env variable is set.\n\nWaiting time between tweets can be set via `WAIT_TIME_HOURS` env variable. If not set, the default is 24 hours. \n\n## How to run it\n\n- Create a Twitter account and an accompanying developer account. \nIn the dev portal, create an app to get the keys/tokens. \n\n- Sign up to [Heroku](https://heroku.com) and create an app.\nSet the access keys for twitter as config vars (in the settings tab): `CONSUMER_KEY`, `CONSUMER_SECRET`, `ACCESS_TOKEN`, `ACCESS_TOKEN_SECRET`\nOptionally also set `START_HOUR` and `WAIT_TIME_HOURS`. \nThe `Procfile` tells Heroku which command to run when starting the app. \n\n- Sign up to [travis-ci.com](https://travis-ci.com) (.org?).\nThe `.travis.yml` file tells Travis to run the tests and, if successful, deploy to Heroku.\nTherefore, the file must contain the Heroku app name and authentication info. \nIf you have the Heroku and Travis CLI tools installed, this command generates the key and adds it to `.travis.yml`:\n\n\n    travis encrypt $(heroku auth:token) --add deploy.api_key [--pro]\n    \nAdd the `--pro` flag if you're using travis.com, not travis.org","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhaitz%2Ftwitter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhaitz%2Ftwitter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhaitz%2Ftwitter-bot/lists"}