A simple tagcloud service that counts the occurence of words from a stream of tweets.
- go get github.com/g-leon/Tagcloud
- cd $GOPATH/src/github.com/g-leon/Tagcloud
- edit tokens.json to include your Twitter OAuth credentials
- go run main.go [OPTIONS]
- go test
-t Number of seconds until the stream is closed (default is 5).
-n Size of the tagcloud that contains most frequent N words.
Rest of the words will be aggregated in the "other" object of the json output.
(default is 0 - words are printed in random order).
-r Use Redis to store and count the frequency of the words.
Must have a Redis server started listening on the default port (6379).
-f Print output to file in addition to terminal.
-s Suppress printing the output to terminal.
- cd $GOPATH/src/github.com/g-leon/Tagcloud
- docker build -t tagcloud .
- docker run tagcloud [OPTIONS]
- docker run -d -p 127.0.0.1:6379:6379 --name redis redis
- cd $GOPATH/src/github.com/g-leon/Tagcloud
- go run main.go [OPTIONS]
- docker run -d -p 127.0.0.1:6379:6379 --name redis redis
- cd $GOPATH/src/github.com/g-leon/Tagcloud
- docker build -t tagcloud .
- docker run --link redis:redis tagcloud -r [OPTIONS]
- cd $GOPATH/src/github.com/g-leon/Tagcloud
- mv Dockerfile Dockerfile.main
- mv Dockerfile.docker-compose Dockerfile
- open Dockerfile and add command line options to "CMD go run main.go [OPTIONS]"
- docker-compose build
- docker-compose up