smart-facility / cognicity-reports-twitter

cognicity-reports: NodeJS app - Twitter support for the CogniCity framework
Other
3 stars 2 forks source link

CogniCity

Open Source GeoSocial Intelligence Framework

Travis build status: Build Status

DOI for current stable release v2.0.0: DOI

cognicity-reports-powertrack: Module for cognicity-reports module to collect unconfirmed reports from Twitter via public API and send verification requests.

About

Cognicity-reports is the NodeJS reports module for the CogniCity framework, responsible for collecting relevant tweets, and sending users verification messages via Twitter. For detailed framework documentation see http://cognicity.info.

Dependencies

Node Modules

Installation

Download the source code for cognicity-reports from github: http://github.com/smart-facility/cognicity-reports or view the CogniCity installation documentation at http://cognicity.info.

Install the node dependencies in package.json using NPM: npm install

PostgreSQL/PostGIS schema

These can be found in the cognicity-schema repository and consist of

Platform-specific notes

To build on OS X we recommend using homebrew to install node, npm, and required node modules as follows:

brew install node
npm install

To build on Windows we recommend installing all dependencies (making sure to use all 32 bit or all 64 bit, depending on your architecture) plus following the instructions (for Windows 7 follow the Windows 7/8 instructions) for node-gyp and then:

Configuration

App configuration parameters are stored in a configuration file which is parsed by app.js. See sample-reports-config.js for an example configuration.

Twitter send parameters

Twitter account configuration

Set the app authentication parameters as provided by Twitter. See the ntwitter-module documentation for more details.

Twitter stream parameters

Messages

Messages can be at most 109 characters long if addTimestamp is enabled, or 123 characters long if addTimestamp is disabled. Note that this length includes one shortened URL at current lengths - see https://dev.twitter.com/overview/t.co for details.

Postgres connection

Run

The app is run as a background process using the Daemonize 2 library. The process name is set to the configuration instance config.instance defined in the configuration file.

$ cd cognicity-server/
$ node daemon.js sample-config.js start
project-name daemon started. PID 1000

$node daemon.js sample-config.js status
project-name running

$node daemon.js sample-config.js stop
project-name daemon stopped

Logging

Express logger writes to project-name.log

License

This software is released under the GPLv3 License. See License.txt for details.