Package: chat-transformer
chat_transformerTranslates incoming IRC messages to OSC, HTTP, or any other output format you need.Installationchat_transformercan be installed usingpip:pipinstallchat_transformerSet upYou must create ajsonfile that specifies that mapping of IRC messages to output data. The file must contain a JSON object, where each KEY is an IRC command/message, and the VALUE is a JSON object with the parameters for converting the IRC message to OSC commands.  For example:{"brightness":{"address":"/osc/brightness/","min":0.0,"max":2.0,"delta":0.1,"initial":1.0,"outputs":{"osc":{"address":"/video/brightness"},"http":{"command_name":"brightness"}}},....}With the above targets data, the following IRC message:brightness set 0.75would translate to the following OSC Message:/osc/brightness 0.75and the following POST message to the main HTTP target:{brightness: {"value": 0.75, "min": 0.0, "max": 2.0}}Usagechat_transformercan be run as a CLI command. At minimum, you must specify the location of a config file that will hold the various settings necessary for runningchat_transformer:chat_transformer--config/path/to/my/config.jsonOr with the shorthand commands:chat_transformer-c/path/to/my/config.jsonRather than specifying options as command-line arguments, options can instead be set as environment variables:exportCHAT_TRANSFORMER_CONFIG=/path/to/my/config.json
chat_transformerCommand Line OptionsArgumentEnv variable nameDescriptionDefault-c, --configCHAT_TRANSFORMER_CONFIGfilepath of the config JSON fileconfig.json-v, --verbosityHow verbose to make the output1 (Info)Configuration FileThe configuration JSON file holds all the necessary settings for running your instance ofchat_transformer. At bear minimum it must include anirckey with the server and login information, acommandskey with information about the the commands JSON file (which contains the list of active commands to listen for and respond to), and at least one output (oscandhttpare supported out of the box).  Here's an example of a minimal configuration file that's listening to freenode:{"irc":{"server":"chat.freenode.net"},"commands":{"filename":"/path/to/my/commands.json"},"outputs":{"osc":{"port":9876}}}Configuration File OoptionsKeyDescriptionDefaultirc.serverServer address of the IRC ServerNone (Required)irc.portPort number of the IRC Server6667irc.nicknameNickname for authnenticating on IRCNone (Required)irc.passwordPassword for authentication on the IRC serverirc.usernameUsername for authentication on the IRC serverirc.nickname(above)irc.realnameReal name on on the IRC serverirc.channelIRC channel to join and listen for incoming commands.irc.nickname(above)commands.filenamePath of the file that holds the IRC commands to listencommands.jsoncommands.watchReload the commands file when it has changed on diskFalsecommands.watch_intervalTime (in seconds) between checking for file changes60output.osc.ipIP Address of the OSC target127.0.0.1output.osc.postPort of the OSC targetNone (RequiredifOSCis used)output.http.base_urlURL target to post toNone (RequiredifHTTPis used)output.http.jwt_secretJWT secret for using JWT encodingCommands File OptionsKeyDescriptionDefaultminMininum possible value for this command0.0maxMaximum possible value for this command1.0deltaAmount to change whenever an INCREMENT or DECREMENT command is received0.05initialInitial value for this command0.5outputs.osc.addressOSC Address to which the message should be sendoutputs.http.command_newKey to used for the POSTed HTTP dataoutputs.http.endpointEndpoint to POST to for this command