Skip to content

serkef/twitter_monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter_monitor

Monitors twitter accounts

How to develop

  • Ensure you are on Python 3.7+ python --version
  • Create a virtual environmentpython -m venv venv/
  • Install poetry
  • Install dependencies with poetry poetry install
  • Run tests pytest tests/

Archiving data to cloud

We have a simple script which compresses past fetched tweets and uploads them to the cloud of your choice using rclone.

  • RCLONE_PATH env needs to be set and sets the path to rclone executable.
  • RCLONE_REMOTE env needs to be set and sets the remote path. Make sure to first config rclone with your cloud settings

Example:

  • export RCLONE_PATH=/usr/bin/rclone
  • export RCLONE_REMOTE="s3-twitter-monitor:twitter-monitor/data/"

Deployment

We have a simple deployment. For this you would need to install webhook on the system that will run twitter monitor. Then we provide a configuration to listen to the webhook and a deployment script to redeploy the application. For those you will need to set:

  • GITHUB_WEBHOOK_SECRET your github webhook secret (so that gh pushes are triggering redeployment)
  • DEPLOY_HOME your project basic folder (where deployment can assume as cwd)
  • DEPLOY_SCRIPT to point to our script
  • APP_HOME is the path where twitter monitor will be installed
  • APP_ENV is the path where virtual environment for twitter monitor will be installed
  • APP_LOGS is the path where logs will be stored

Example:

  • export GITHUB_WEBHOOK_SECRET=xxx
  • export DEPLOY_HOME=/home/ubuntu
  • export DEPLOY_SCRIPT=/home/ubuntu/webhook-redeploy.sh
  • export APP_HOME=/opt/twitter-monitor
  • export APP_ENV=/opt/twitter-monitor/venv
  • export APP_LOGS=/home/ubuntu/twimon-logs

About

Monitors twitter accounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published