How to colorize an xml by code

The following class will help you to do that. You can easily transform this : <?xml version="1.0" encoding="UTF-8"?> <kcfg xmlns="" xmlns:xsi="" xsi:schemaLocation=""> <kcfgfile name=""/> <group name="com.librehat.yahooweather"> <entry name="woeid" type="String"> <default></default> </entry> <entry name="interval" type="Int"> <default>60</default> </entry> <entry name="celsius" type="Bool"> <default>true</default> </entry> <entry name="fahrenheit" type="Bool"> <default>false</default> </entry> <entry name="ms" type="Bool"> <default>false</default> </entry> <entry name="kmh" type="Bool">… Read More »

Hubot : how to pipeline your commands ?

If you got used to creating new commands in your Hubot server, you will probably remember of this syntax : robot.hear(/say hello/i, function(res) {/*...*/} robot.respond(/how are you/i, function(res) {/*...*/} When you want to combine then into one, the easy way out is to create a spare command like this one : robot.respond(/hello, how are you/i,… Read More »