Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhnvrm/constassemblybot
A twitter bot that tweets a sentence from the Indian Constituent Assembly Debates every 10 minutes.
https://github.com/rhnvrm/constassemblybot
bot constitution india twitter twitter-bot
Last synced: 24 days ago
JSON representation
A twitter bot that tweets a sentence from the Indian Constituent Assembly Debates every 10 minutes.
- Host: GitHub
- URL: https://github.com/rhnvrm/constassemblybot
- Owner: rhnvrm
- License: mit
- Created: 2020-05-25T12:48:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T21:20:33.000Z (over 1 year ago)
- Last Synced: 2024-05-02T06:05:34.923Z (6 months ago)
- Topics: bot, constitution, india, twitter, twitter-bot
- Language: Python
- Homepage: https://twitter.com/ConstAssembly
- Size: 6.05 MB
- Stars: 13
- Watchers: 5
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @ConstAssembly Twitter Bot
A [twitter bot](https://twitter.com/ConstAssembly) that tweets a sentence from the Indian Constituent Assembly Debates every 10 minutes.
## Development Docs
The bot resides in `bot.py` and uses the Tweepy library to tweet text. The
bot depends on the following files:1. `data.txt` - This file contains the raw text, which is used by the bot.
2. `last_line.txt` - This file is the memory of the bot. This is used so that the bot can dump its state to disk between each run. The bot currently runs as a cron job. Eg.
```
12
0
```
Where line 0 represents the row and line 1 represents the column in the data.txt file.3. `.env` - This file contains the secrets required by the bot, such as Twitter API keys.
### Getting Started
You can get started by cloning this repository.
``` sh
git clone [email protected]/rhnvrm/ConstAssemblyBot
```After this, you can install dependencies using:
``` sh
cd ConstAssemblyBot
pipenv shell
pipenv install
```You can now, install a cronjob like this:
```cronjob
*/10 * * * * cd $HOME/apps/ConstAssemblyBot && /usr/local/bin/pipenv run python bot.py
```