dev-halfnarp-tabular TABULAR HALFNARP OUTPUT

Hi 33c3,
this gives out a tabular info from your Halfnarp, like you can see on 🔗33c3 under "INTERESTING TALKS".

Let us know if this works for you:
    matic@totalism.org or http://twitter.com/hairyfotr



CREATE AND RUN HALFNARP.SH:
"""
# curl all talks
curl 'http://halfnarp.events.ccc.de/-/talkpreferences?format=json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://halfnarp.events.ccc.de/' -H 'X-Requested-With: XMLHttpRequest' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.28 Safari/537.36' --compressed > talks.json

# replace hash with yours here and curl your talks
curl 'http://halfnarp.events.ccc.de/-/talkpreferences/public/2523af40b1d4cd02eec8ba02d29ec925243ab74870548ffc8a8afac67e44daab?format=json' -H 'DNT: 1' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8,es;q=0.6,sl;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.28 Safari/537.36' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://halfnarp.events.ccc.de/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --compressed > halfnarp.json
"""
$ chmod +x halfnarp.sh
$ ./halfnarp.sh



CREATE AND RUN HALFNARP.JS (needs ~ v5.0+):
"""
var talks = require('./talks.json')
var halfnarp = require('./halfnarp.json')
var selection = talks.filter(talk => halfnarp.talk_ids.includes(talk.event_id))
roomMap = {'379': 'Hall 1', '380': 'Hall 2', '381': 'Hall G', '382': 'Hall 6'}
selection.map(talk => `    * Day ${new Date(talk.start_time).getDate()-26}: ${new Date(talk.start_time).getHours()}:${new Date(talk.start_time).getMinutes()}, ${roomMap[talk.room_id]}, ${talk.title}`.replace(':0,', ':00,')).sort().forEach(a => console.log(a))
"""
$ node --harmony ./halfnarp.js


That's it!

    Changes: Include abstract
"""
selection.map(talk => `    * Day ${new Date(talk.start_time).getDate()-26}: ${new Date(talk.start_time).getHours()}:${new Date(talk.start_time).getMinutes()}, ${roomMap[talk.room_id]}, [extra:${talk.title}:${talk.abstract}]`.replace(':0,', ':00,')).sort().forEach(a => console.log(a))
"""

    Changes: Compare halfnarps
var halfnarp1 = require('./halfnarpHairyFotr.json')
var halfnarp2 = require('./halfnarpDcht00.json')
# Both selected (Intersection)
var selection = talks.filter(talk => halfnarp1.talk_ids.includes(talk.event_id) && halfnarp2.talk_ids.includes(talk.event_id))
# Only first one selected (Difference)
var selection = talks.filter(talk => halfnarp1.talk_ids.includes(talk.event_id) && !halfnarp2.talk_ids.includes(talk.event_id))


JavaScript license information


(Site generated by E2H, an "Etherpad hypermedia" project by @dcht00). Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


Edit Site

Talk