{"id":19442948,"url":"https://github.com/syncom/twitbot-tih","last_synced_at":"2025-04-25T00:32:07.785Z","repository":{"id":29245433,"uuid":"32777693","full_name":"syncom/twitbot-tih","owner":"syncom","description":"A Twitter bot that tweets today-in-history events","archived":false,"fork":false,"pushed_at":"2024-07-27T13:32:18.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T13:39:14.670Z","etag":null,"topics":["today-in-history","twitter-bot"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syncom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-03-24T05:17:27.000Z","updated_at":"2024-10-13T12:02:36.000Z","dependencies_parsed_at":"2023-02-10T20:15:27.078Z","dependency_job_id":"a622f609-9d05-43a4-ad70-733f87fc1b21","html_url":"https://github.com/syncom/twitbot-tih","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/syncom%2Ftwitbot-tih","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Ftwitbot-tih/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Ftwitbot-tih/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Ftwitbot-tih/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syncom","download_url":"https://codeload.github.com/syncom/twitbot-tih/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250733324,"owners_count":21478339,"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":["today-in-history","twitter-bot"],"created_at":"2024-11-10T15:41:30.750Z","updated_at":"2025-04-25T00:32:07.411Z","avatar_url":"https://github.com/syncom.png","language":"Python","readme":"# twitbot-tih\n\n[![Sanity Checks](https://github.com/syncom/twitbot-tih/actions/workflows/sanity.yml/badge.svg)](https://github.com/syncom/twitbot-tih/actions/workflows/sanity.yml)\n\nA Twitter bot that tweets today-in-history events.\n\n## Dependencies\n\n- Python 3 with virtual environment. On Ubuntu, install `python3-virtualenv`.\n\n- Unix/Linux environment and the 'date' command\n\n- If you run on a Raspberry Pi, you might need to install `rng-tools` for the\n  SSL connection to work\n\n## Usage\n\n1. Install with the following commands\n\n   ```bash\n   git clone https://github.com/syncom/twitbot-tih.git\n   cd twitbot-tih\n   make install\n   ```\n\n2. Create a Twitter app and obtain the API Key, API Secret, Access Token, and\n   Access Token Secret for the app. This can be done by following the\n   instructions at:\n   \u003chttps://developer.twitter.com/en/docs/twitter-api/getting-started/getting-access-to-the-twitter-api\u003e.\n   After April 2023, if you start seeing API authentication errors, and a\n   message like \"This app has violated Twitter rules and policies\" on the\n   Twitter app setting page, sign up for the Free tier of \"[Twitter API\n   v2](https://developer.twitter.com/en/portal/products)\" (at no cost), and\n   clicked button \"downgrade to free\"; this resolved the auth issue\n   ([reference](https://twittercommunity.com/t/this-app-has-violated-twitter-rules-and-policies/191204/10)).\n   You may also need to put the Twitter app under a \"project\" for better\n   organization and monitoring of the app.\n\n3. Set up authentication and authorization secrets. The preferred way is to set\n   environment variables `TIH_API_KEY`, `TIH_API_SECRET`, `TIH_ACCESS_TOKEN`,\n   and `TIH_ACCESS_TOKEN_SECRET` with API Key, API Secret, Access Token, and\n   Access Token Secret values obtained in the last step. Alternatively, one can\n   override the corresponding strings in the file [.auth](./.auth) with\n   appropriate secret strings. When any of the aforementioned environment\n   variables are set, they take precedence over values in the `.auth` file.\n\n4. Activate the virtual environment.\n\n   ```bash\n   . ./venv\n   ```\n\n5. In virtual environment, run `python today_in_history_bot.py` to tweet.\n\n6. (Optional) Create a cron job to invoke the bot once a day.\n   [twitbot-tih-run.sh](twitbot-tih-run.sh) shows an example script that can be\n   called within the cronjob.\n\n7. To uninstall, `deactivate` from the virtual environment if needed, and do\n   `make clean`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncom%2Ftwitbot-tih","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncom%2Ftwitbot-tih","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncom%2Ftwitbot-tih/lists"}