👉 @cfdspace
👉 https://acrlakshman.github.io/twitter-bot-computational-fluids/
I search twitter feed every few minutes for some hashtags, focused on computational research and I retweet them for now.
Sure you can, just fork me, change some code logic or default hashtags that suits your needs and deploy it as detailed below. But, please put me only to good use.
Yes you can. Connect to mongodb and change the values in the collection config
. Some of the things you can do right now are:
- Change number of tweets that I can search for each time I make API call
- Pause me by setting
pause_app: true
. I won't talk to twitter 😄 - Change hashtags for which I can scan twitter to find content
- Add or remove inclusion or exclusion strings that will be scanned in the full tweet before processing
- Add or remove users whose tweets won't be retweeted
- I scan for some tweets with predefined hashtags
- I store them in a database to do further processing. This avoids me to make too many API calls
- I scan for some metadata and post tweets that meet predefined criteria and save both posted tweets and discarded tweets
- Posted and discarded list are used to avoid spamming content. In future I will periodically clean these databases
Poll vs Stream
: Currently I rely on pollingContext analysis
: For now I can't handle this, but you can extend me to do that
computationalfluiddynamics
multiphaseflows
volumeoffluid
latticeboltzmann
- Clone and configure the scripts
git clone https://github.com/acrlakshman/twitter-bot-computational-fluids twitter-bot
cd twitter-bot
mkdir -p logs db
- Enter API keys and ACCESS tokens in
docker-compose.yml
- Enter desired credentials for mongodb admin.
- Start containers
docker-compose build
docker-compose up -d
docker-compose down
Make sure to create swarm
docker swarm init
# or
docker swarm init --advertise-addr <MANAGER_NODE_IP>
git clone https://github.com/acrlakshman/twitter-bot-computational-fluids twitter-bot
cd twitter-bot
mkdir -p logs db
- Enter API keys and ACCESS tokens in
docker-stack.yml
- Enter desired credentials for mongodb admin.
- Start containers
docker stack deploy -c docker-stack.yml cfdspace_stack
docker stack rm cfdspace_stack
- Database persists in the volume
db
- App logs are stored in
logs/cfdspace.log
- This app uses a persistent database, which keeps growing and will consume disk space. For now you need to manually perform the cleanup and keep an eye on the space used by mongodb. I will update the code to automate such that app does this automatically while it is running.
- Any changes made to the source code in
app/
requires rebuilding docker image.