fix alcune funzioni

This commit is contained in:
Enrico Fasoli 2015-04-25 18:37:13 +02:00
parent 957c00fc78
commit f7845da803
4 changed files with 25 additions and 2 deletions

View File

@ -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) ->

View File

@ -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'

View File

@ -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]

18
scripts/meteo.coffee Normal file
View File

@ -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')