sutaba-server

command module
v0.0.0-...-1ac6b74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2025 License: MIT Imports: 1 Imported by: 0

README

sutaba-server

Twitter bot that recognize whether the replied image is photographed in Starbucks or not.

Configuration

You can specify server configurations by flags or config file. Also, you must specify twitter credentials via environment variable.

flags
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)
config file

See config.yml

Twitter credentials

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

Run server

binary

Download from GitHub Releases and put it anywhere in your executable path.

$ sutaba-server start --config ./config.yml
from source
$ git clone https://github.com/mpppk/sutaba-server
$ cd sutaba-server
$ go run main.go start --config ./config.yml
Docker
$ git clone https://github.com/mpppk/sutaba-server
$ cd sutaba-server
$ docker-compose up

Deploy

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
option
Package option provides utilities of option handling
Package option provides utilities of option handling
selfupdate
Package selfupdate provides function to update binary
Package selfupdate provides function to update binary
pkg
util
Package util provides some utilities
Package util provides some utilities

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL