Twitter bot that recognize whether the replied image is photographed in Starbucks or not.
You can specify server configurations by flags or config file. Also, you must specify twitter credentials via environment variable.
Start server
Usage:
sutaba-server start [flags]
Flags:
--bot-id int bot twitter user id
--classifier-server string classifier server url
--error-message string text of tweet for error notification
-h, --help help for start
--keyword string process only tweets which contain this value
--owner-id int owner twitter user id (error tweet will be send to owner if something is failed)
--sorry-message string text of tweet to send to user if process is failed
Global Flags:
--config string config file (default is $HOME/.sutaba-server.yaml)
See config.yml
You must specify below environment variables.
- TWITTER_CONSUMER_KEY
- TWITTER_CONSUMER_SECRET
- OWNER_TWITTER_ACCESS_TOKEN
- OWNER_TWITTER_ACCESS_TOKEN_SECRET
- BOT_TWITTER_ACCESS_TOKEN
- BOG_TWITTER_ACCESS_TOKEN_SECRET
Download from GitHub Releases and put it anywhere in your executable path.
$ sutaba-server start --config ./config.yml
$ git clone https://github.com/mpppk/sutaba-server
$ cd sutaba-server
$ go run main.go start --config ./config.yml
$ git clone https://github.com/mpppk/sutaba-server
$ cd sutaba-server
$ docker-compose up
This repository includes deploy scripts for GCP(Container Registry and Cloud Run).
Before run scripts, update scripts by your project id.
$ ./scripts/gcp/submit_container_image.sh
$ ./scripts/gcp/deploy_to_cloud_run.sh