aun-subscreen: the kaigi subscreen system
CSS JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
bower_components
lib
public
routes
views
.gitignore
Gruntfile.js
Procfile
README.md
app.js
app.json
bower.json
npm-shrinkwrap.json
package.json

README.md

aun-subscreen: the kaigi subscreen system

aun-subscreen is a re-implementation of a subset of aun. aun is the kaigi signage system, which was operated at RubyKaigi 2013. Since aun has lots of "RubyKaigi" specific features, it is too much for regular purpose.

aun-subscreen is just for "subscreen", which gives a timeline view of tweets and IRC messages. By keeping the scope small, the deployment becomes much more simple. We, team aun, hope to see aun energizes the communication in many conferences!

Requirements

Deployment to Heroku

Deploy to Heroku

or Setup as below

Create application

$ heroku create [Your Application Name]

Set environment variables

See below.

Prepare database

See documents for detail.

Create database:

$ heroku addons:add heroku-postgresql:dev --version=9.3
Adding heroku-postgresql:dev on aun-subscreen... done, v4 (free)
Attached as HEROKU_POSTGRESQL_AMBER_URL
Database has been created and is available
 ! This database is empty. If upgrading, you can transfer
 ! data from another database with pgbackups:restore.
Use `heroku addons:docs heroku-postgresql` to view documentation.

Make sure to add --version=9.3 option. The part HEROKU_POSTGRESQL_AMBER_URL may vary.

Attach database:

$ heroku pg:promote HEROKU_POSTGRESQL_AMBER_URL
Promoting HEROKU_POSTGRESQL_AMBER_URL (DATABASE_URL) to DATABASE_URL... done

(Specify the same url as result in addons:add heroku-postgresql:dev)

Push code

git push heroku master

Configuration

You need to configure aun-subscreen with environment variables. This is to play with PaaS deployment, such as heroku.

For development or deployment on local machines, foreman is useful to keep environment variables and sub-subcreen to be running.

Global Configurations

NODE_ENV

Use production for production.

NODE_ENV=production

PORT

aun-subscreen will listen on the PORT. heroku will set this automatically.

DATABASE_URL

URL to PostgreSQL.

MESSAGES_LIMIT (optional)

Rough number of messages to keep in DB. This does not work exactly due to restriction of implementation. As Heroku Postgres Dev database can keep only 10,000 rows, say, 9,500 will be reasonable value including margin.

MESSAGES_LIMIT=9500

If none specified, all messages will be kept.

HEROKU_URL (optional)

Periodically ping this URL if specified to keep alive. This is especially useful for deployment on heroku, since heroku gets down inactive web dynos unless more than one dynos reserved.

HEROKU_URL=http://[your-app-name].herokuapp.com

Twitter Receiver Configurations

If you want to receive twitter stream, you need to set these variables.

TWITTER_AUTH

Credentials for twitter. Tokens should be concatenated with ':'.

TWITTER_AUTH=[Consumer key]:[Consumer secret]:[Access token]:[Access token secret]

TWITTER_QUERY

Strings to track.

Example:

TWITTER_QUERY=aun,rubykaigi
  • TWITTER_QUERY should be comma separated

IRC Receiver Configurations

If you want to receive messages from IRC, you need to set these variables.

IRC_SERVER

Hostname of the IRC server.

Example:

IRC_SERVER=irc.example.com

IRC_PORT (optional)

Port number of the IRC server.

Example:

IRC_PORT=6667

IRC_NICK

Nick to use to connect the IRC server.

Example:

IRC_NICK=aun-receiver

IRC_CHANNELS

Channels to join.

EXAMPLE:

IRC_CHANNELS=#test1,#test2
  • IRC_CHANNELS should be comma separated

Filters

You may want to hide some tweets from screen. This is for it. Two types of filters are available: regular expression based filter and screen name based filter.

TWITTER_EXCLUDE_REGEXP

Regexp to exclude tweets from screen.

Example (to exclude RTs):

TWITTER_EXCLUDE_REGEXP=^RT
  • TWITTER_EXCLUDE_REGEXP should be a regular expression

TWITTER_EXCLUDE_SCREEN_NAME

Screen names to exclude from screen.

TWITTER_EXCLUDE_SCREEN_NAME=[Screen Names]
  • TWITTER_EXCLUDE_SCREEN_NAME should be comma separated

Usage

Open http://[Your Application Name].herokuapp.com with your web browser.

You will see all messages received.

Query parameters

You can have different views by specifying query parameters.

tweet

If you specify ?tweet=[Twitter Filtering Regexp], tweets matching with the regexp are shown.

irc

If you specify ?irc=test, only messages on #test channels are shown. You can provide multiple channels separating with comma. If you want to show channels #test1 and #test2, you need to specify ?irc=test1,test2.

Combination

You can use tweet and irc parameters in combination. ?tweet=example&irc=test will show tweets containing example in text and messages from IRC channel #test.

Team aun

Special Thanks!!