Git Product home page Git Product logo

tagcloud's Introduction

Tagcloud

A simple tagcloud service that counts the occurence of words from a stream of tweets.

Quick Start

  • 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

Command Line Options

-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.

Run in a Docker container

  • cd $GOPATH/src/github.com/g-leon/Tagcloud
  • docker build -t tagcloud .
  • docker run tagcloud [OPTIONS]

Run with a dockerized Redis server

  • 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]

Run a dockerized Tagcloud with a linked dockerized Redis server

  • 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]

Run a dockerized Tagcloud with a linked dockerized Redis server using docker-compose

  • 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

tagcloud's People

Contributors

g-leon avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.