Skip to content

spacebro/bro-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bro-rercorder

Utility for recording and playback a serie of spacebro events.

Usage

bro-rercorder is meant to be used as is. You install it, provide a custom configuration file and run it.

Install
$ git clone git@github.com:spacebro/bro-rercorder.git
$ cd bro-rercorder/
$ npm i
Eventually use custom settings
$ cp settings/settings.default.js settings/settings.js
$ vim settings/settings.js

Run

Record

Stop recording by ctrl+c, SIGTERM, or by sending a bro-recorder-stop event to the channel.

$ node record.js
Plaback
$ node play.js

You can override the settings.json file with CLI args like so:

$ node play.js --play.filepath /path/to/my/file.json

Settings

{
  "verbose": false, // does bro-rercorder logs everything or not
  "record": {
    "events": ["*"],
    // an array of event names to listen to. you can use a wildcard,
    // but bro-recorder won't be able to write the event name in the file
    "folder": "./library", // path the folder where you want to write your files
    "filename": "bro-recorder", // name of the file (no extension, bro-record will append '.json')
    "overwrite": false
    // if set to false, bro-recorder will add a timestamp to the filename
    // so you can keep versions of your recording. if not, bro-recorder will simply overwrite the file.
  },
  "play": {
    "filepath": "./library/bro-recorder.json", // path to the recording file
    "loop": false // wether to loop the record or not
  },
  "spacebro": {
    "host": "127.0.0.1", // host of your spacebro server
    "port": 8888, // port of your spacebro server
    "channelName": "bro-record" // channel name you want to use (optionnal)
  }
}

About

record and playback a serie of spacebro events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published