Socket
Socket
Sign inDemoInstall

playlyfe-odysseus

Package Overview
Dependencies
3
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    playlyfe-odysseus

Parse and build stories out of Playlyfe Events.


Version published
Weekly downloads
28
increased by154.55%
Maintainers
1
Install size
5.12 MB
Created
Weekly downloads
 

Readme

Source

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.

Usage

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

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

Authors

License

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

http://www.apache.org/licenses/LICENSE-2.0

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.


Playlyfe

Keywords

FAQs

Last updated on 14 Oct 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc