diff --git a/scripts/agenda.coffee b/scripts/agenda.coffee index e3008fe..05574dd 100644 --- a/scripts/agenda.coffee +++ b/scripts/agenda.coffee @@ -101,7 +101,7 @@ module.exports = (robot) -> robot.respond /(?:guarda l')?agenda (?:per il )?(\d+-\d+-\d+)/i, (res) -> cosaCePerIl res.match[1], res robot.respond /(?:che )?compiti(?: ci sono)?(?:\?)?/i, (res) -> - res.send 'controllo compiti...' + res.send 'controllo compiti... (potrei metterci fino a 3 minuti)' getCompiti (compiti) -> # tengo solo quelli per il futuro compiti = compiti.filter (c) -> diff --git a/scripts/circolari.coffee b/scripts/circolari.coffee index 7d56270..aae2df6 100644 --- a/scripts/circolari.coffee +++ b/scripts/circolari.coffee @@ -79,7 +79,7 @@ module.exports = (robot) -> ['('+c.protocollo.split('/')[0]+')','('+c.data+')',c.titolo].join(' ') res.send msg.join ' | ' - robot.respond /linkami (?:(?:la )?circolare )(?:(?:n(?:°)?(?: )?)|numero )?(\d+)/i, (res) -> + robot.respond /linkami (?:la )?circolare (?:(?:n(?:°)?(?: )?)|numero )?(\d+)/i, (res) -> base = "http://galileicrema.it/Intraitis/documenti/comunicazioni/2014/Circolare" res.send base+res.match[1]+'.pdf' diff --git a/scripts/github.coffee b/scripts/github.coffee index 438ac5e..31b6500 100644 --- a/scripts/github.coffee +++ b/scripts/github.coffee @@ -45,3 +45,8 @@ module.exports = (robot) -> if labels is '' then labels = 'nessuno' ["#"+i.number,i.title,"By: "+i.user.login,'Tags: '+labels].join(' | ') res.send r.join '\n' + + robot.respond /linkami (?:la )?issue (?:(?:n(?:°)?(?: )?)|numero )?(\d+)/i, (res) -> + base = 'http://github.com/fazo96/asjon/issues/' + res.send base+res.match[1] + diff --git a/scripts/meteo.coffee b/scripts/meteo.coffee new file mode 100644 index 0000000..d08db05 --- /dev/null +++ b/scripts/meteo.coffee @@ -0,0 +1,18 @@ +# Description: +# utilità per il meteo +# +# Dependencies: +# None +# +# Configuration: +# None +# +# Commands: +# hubot +# +# Author: +# Enrico Fasoli (fazo96) + +module.exports = (robot) -> + robot.respond /che tempo(?: c'è| fa)?(?: a crema)?(?:\?)?/i, (res) -> + res.send moment().format('dddd Do MMMM YYYY H:MM:SS')