This repository has been archived by the owner. It is now read-only.
Parse and build stories out of the Playlyfe Events.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Playlyfe Odysseus Build Status

Parse and build stories out of Playlyfe Events.

Odysseus is a story spinner at heart, taking in the events in JSON format, and spinning out human readable sentences to be consumed by apps. Odysseus can output messages in both plain-text and HTML formats.


Odysseus can be used as a node module, or as a bower module. It depends on the libraries momentjs and lodash.


Odysseus = require('playlyfe-odysseus');
odysseus = new Odysseus(config);

For getting proper messages in HTML format, you can supply a list of markup classes you want to assign different parts of the sentence. This markup class list will be in a key-value format like so:

config.markup = {
  actor: "pl-actor",
  target: "pl-target",
  object: "pl-object",
  role_list: "pl-role-list",
  timestamp: "pl-ts"

The meaning of the markup tags are listed below:

  • actor: the actor in the event.
  • player: the player (or rather, the target) in the event.
  • object: the team/process in the event.
  • role_list: the list of roles.
  • diff_list: the list of changes.
  • list_header: the title of the list.
  • role: the role name.
  • lane: the lane name.
  • diff_add: the role added in a diff_list.
  • diff_rem: the role removed in a diff_list.
  • diff_change: the item in the diff_list which has both an addition and a removal.
  • timestamp: the timestamp for the event.



Copyright 2013 Playlyfe Technologies, LLP

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.