From 957c00fc786e596bf934db6a0aa18418c31b4417 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Sat, 25 Apr 2015 18:26:24 +0200 Subject: [PATCH] compiti e issue implementati. fix #6 --- file.png | Bin 0 -> 16081 bytes package.json | 1 + scripts/agenda.coffee | 98 ++++++++++++++++++++++++++++++------------ scripts/github.coffee | 27 ++++++++++++ scripts/misc.coffee | 2 - 5 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 file.png diff --git a/file.png b/file.png new file mode 100644 index 0000000000000000000000000000000000000000..ae6177927b9b72c7af8446d67c403b8e7c236096 GIT binary patch literal 16081 zcmd_RcRbbq|2O_3rDc@2b~I23l|p1h5z1bfMPy`TZz`b_kx>~Tdy~D6Rf>$V9UO{m z$2tyRlBu7 z{C@w!7e7DFf}J~`>{j)@v3uvKv&P$NQ#I&rbXwln$9gSWV^&>NKkroF!xvAowXUU| zPz&0vac8^f8v`MlJ9~FoN&Cv1tx;>=Ob&d@>f;h5FL_t}iHLdUKolnrJr*OxIJD`^ zI9KSwcrdKtidEs!zduQ7p1`)DpKd+I&{(na+iB0E?=}DItU=!~_5Vj+a5K;uCSrl_ z%9TEqV*ISCr97!IpNBn|9Xs(4Oi2SXfoYX#_?5sf0ppA=M#Xih;-tTA@f5ps2>bT^VYOJUePuYzG zO~#V&leDVhHMPO!hw;!RH3pCfHc_!8S5MS-e+ zK1bF@585!T!n$Y%u-(N1Pu9AZYULVcE5(YsHN84=`DbgaSZ0>BCg%b7wWfYqcV8O# z%w=qwRE+tL#AgXHZ{GYa8JZicAT_Wkr#Ve`XJ}?d{_N=JO1!a$;kc*(*=htd_lf!N>@2@3i29Rt@spU|0OLZOJJq8F1~X&h$5% z8{?8z_5KXrJuGwURPn7^diFGv#^8)QpHkG+)UG-S+YV*bKBY&Wclhw(4AqbRy2TIE z1K8YeMhn}nc-%@n8Rl?sZXv^_vCD;OQ=<2V>$X~RBws{iWJ)BT-qdUffzj%YQ2^ud zpD^XQaM5&|!E%M$w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358} + extractorCompiti = -> + col = $($('td',this).get(1)).text().trim() + arr = col.split(/(?:\s+)Materia: /i) + if $('td',this).get(1)? + data: $($('td',this).get(0)).text().trim() + text: arr[0], materia: arr[1] + else {} + $ = cheerio.load compiti + return $('.result_table tr').map(extractorCompiti).get().filter (c) -> c.text? + +estraiAgenda = (agenda) -> + extractorAgenda = -> + if $('td',this).get(1)? + $($('td',this).get(1)).text().trim() + else "(niente)" + $ = cheerio.load agenda + tab = $('.result_table tr').map(extractorAgenda).get() + tab.splice 0, 2 + return tab + downloadAgenda = (day, cb) -> - cbCalled = no - htmlData = "" + agenda = ""; compiti = "" loadHtml = -> document.body.innerHTML - saveHtml = (data) -> htmlData = data - dayHasEvents = (b) -> - unless b - cbCalled = yes - cb [] + saveAgenda = (data) -> agenda = data + saveCompiti = (data) -> compiti = data + dayurl = moment(day,'YYYY-MM-DD').format('YYYY-M-D') n = new Nightmare() .goto('https://galilei-cr-sito.registroelettronico.com/login/') .type('#username',process.env.REGISTRO_USERNAME) .type('#password',process.env.REGISTRO_PASSWORD) - .click('#btnLogin').wait() + .click('#btnLogin').wait().screenshot('file.png') if process.env.REGISTRO_ID_STUDENTE n.goto('https://galilei-cr-sito.registroelettronico.com/select-student/'+process.env.REGISTRO_ID_STUDENTE+'/') - n.goto('https://galilei-cr-sito.registroelettronico.com/agenda/?d='+day) - .evaluate(loadHtml, saveHtml) - n.run (err,nightmare) -> - if err then console.log err - if !cbCalled and htmlData.length > 0 - rowExtractor = -> - if $('td',this).get(1)? - $($('td',this).get(1)).text().trim() - else "(niente)" - $ = cheerio.load htmlData - tab = $('.result_table tr').map(rowExtractor).get() - tab.splice 0, 2 - cb tab + n.goto('https://galilei-cr-sito.registroelettronico.com/agenda/?d='+dayurl) + .evaluate(loadHtml, saveAgenda) + .goto('https://galilei-cr-sito.registroelettronico.com/tasks/') + .evaluate(loadHtml, saveCompiti) + .run (err,nightmare) -> + if err then console.log err + if agenda.length > 0 + tab = estraiAgenda agenda + comp = estraiCompiti compiti + cb tab, comp + else [] + +getCompiti = (cb) -> + compiti = '' + loadHtml = -> document.body.innerHTML + saveCompiti = (data) -> compiti = data + n = new Nightmare() + n.goto('https://galilei-cr-sito.registroelettronico.com/login/') + n.type('#username',process.env.REGISTRO_USERNAME) + n.type('#password',process.env.REGISTRO_PASSWORD) + n.click('#btnLogin').wait().screenshot('file.png') + if process.env.REGISTRO_ID_STUDENTE + n.goto('https://galilei-cr-sito.registroelettronico.com/select-student/'+process.env.REGISTRO_ID_STUDENTE+'/') + n.goto('https://galilei-cr-sito.registroelettronico.com/tasks/') + n.evaluate(loadHtml, saveCompiti) + n.run (err,nightmare) -> cb estraiCompiti compiti cosaCePerIl = (day,res) -> unless process.env.REGISTRO_USERNAME and process.env.REGISTRO_PASSWORD return res.send 'non dispongo delle credenziali per il registro :(' res.send 'aspetta che guardo l\'agenda per il '+day+' (potrei metterci fino a 3 minuti)' - downloadAgenda day, (data) -> - if data.length is 0 + downloadAgenda day, (ag,comp) -> + if ag.length is 0 and comp.length is 0 res.send "non c'è niente segnato sull'agenda per il "+day else - res.send "ecco cosa c'è per doma: "+data.join('; ') + c = comp.filter (x) -> x.data is moment(day,'YYYY-MM-DD').format('DD-MM-YYYY') + c = c.map (x) -> x.materia+': '+x.text + res.send "Agenda del #{day}: "+ag.concat(c).join(', ') module.exports = (robot) -> - robot.respond /cosa c'è per domani?/i, (res) -> + robot.respond /(?:guarda l')?agenda (?:per )?doma(?:ni)?/i, (res) -> cosaCePerIl moment().add(1, 'days').format('YYYY-MM-DD'), res - robot.respond /cosa c'è per il (\d+-\d+-\d+)/i, (res) -> + 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...' + getCompiti (compiti) -> + # tengo solo quelli per il futuro + compiti = compiti.filter (c) -> + moment(c.data,'DD-MM-YYYY').isAfter(moment().subtract(1,'weeks')) + # trasformo in stringa + compiti = compiti.map (c) -> + [c.data,c.materia,c.text].join ' | ' + res.send compiti.join '\n' diff --git a/scripts/github.coffee b/scripts/github.coffee index dea9413..438ac5e 100644 --- a/scripts/github.coffee +++ b/scripts/github.coffee @@ -1,5 +1,17 @@ # Description: # interazioni tra asjon e github +# +# Requires: +# "github": "0.2.4" +# +# Commands: +# asjon mostra le issue - mostra le issue aperte su fazo96/asjon +# +# Author: +# Enrico Fasoli (fazo96) + +GitHubAPI = require 'github' +github = new GitHubAPI version: '3.0.0' module.exports = (robot) -> robot.router.post '/hubot/githubhook/:room/:name', (req, res) -> @@ -18,3 +30,18 @@ module.exports = (robot) -> [c.committer.username,c.message].join ' -> ' commits = cm.join '\n' robot.send dest, s+commits + if process.env.AUTO_KILL_ON_UPDATE + setTimeout 1000, -> + console.log 'DYING NOW AS REQUESTED!' + process.exit 0 + + robot.respond /(?:(?:mostra(?:mi)?|fammi vedere) )(?:le )?issue(?:s)?/i, (res) -> + msg = state: 'open', user: 'fazo96', repo: 'asjon', sort: 'updated' + res.send 'controllo issues...' + github.issues.repoIssues msg, (err,data) -> + if err then return res.send err + r = data.map (i) -> + labels = i.labels.map((x) -> x.name).join ', ' + if labels is '' then labels = 'nessuno' + ["#"+i.number,i.title,"By: "+i.user.login,'Tags: '+labels].join(' | ') + res.send r.join '\n' diff --git a/scripts/misc.coffee b/scripts/misc.coffee index 0b12fd2..c2fd9eb 100644 --- a/scripts/misc.coffee +++ b/scripts/misc.coffee @@ -45,8 +45,6 @@ module.exports = (robot) -> l.push a[i]+' volt'+(if a[i] is 1 then 'a' else 'e')+' '+i res.send 'mi hanno chiamato '+l.join(', ') # Altro - robot.hear /compiti/i, (res) -> - res.send 'ricordatevi che se mi chiamate chiedendo cosa c\'è per domani posso guardare io sull\'agenda!' robot.respond /saluta (.+)/i, (res) -> res.send 'ciao ' + res.match[1] robot.respond /spaca botilia/i, (res) ->