mattriley / node-kris-kringle

Christmas gift-giving made easy by randomising a draw and notifying players of their KK by SMS text message.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kris Kringle

160 sloc 18 files 4 deps 10 dev deps

Christmas gift-giving made easy by randomising a draw and notifying players of their KK by SMS text message.


Table of Contents

Install

https://www.npmjs.com/package/kris-kringle

npm install kris-kringle

SMS notifications are sent using AWS SNS and requires an AWS profile to be configured.

Usage

kk <configJsonFile>

configJsonFile defaults to config.json.

Example

config-example.json

{
    "dryRun": true,
    "template": "Hey {name}! Your KK is {kk}. The spend is ${spend}. Merry Christmas! πŸŽ…πŸ»πŸŽ„",
    "spend": 100,
    "players": [
        {
            "name": "foo",
            "number": "+6111111111"
        },
        {
            "name": "bar",
            "number": "+6122222222"
        },
        {
            "name": "baz",
            "number": "+6133333333"
        }
    ]
}

Text messages:

  • Hey foo! Your KK is baz. The spend is $100. Merry Christmas! πŸŽ…πŸ»πŸŽ„
  • Hey bar! Your KK is foo. The spend is $100. Merry Christmas! πŸŽ…πŸ»πŸŽ„
  • Hey baz! Your KK is bar. The spend is $100. Merry Christmas! πŸŽ…πŸ»πŸŽ„

See src/default-config.json for other config options.

Architecture

Can't see the diagram? View it on GitHub

graph TD;
    commands-->effects;
    commands-->lib;
    commands-->config;
    effects-->io;
    effects-->config;
    io-->config;
    lib-->config;

This diagram was generated with Module Composer


About

Christmas gift-giving made easy by randomising a draw and notifying players of their KK by SMS text message.


Languages

Language:JavaScript 96.8%Language:Shell 3.2%