Normalize Wiki

We read the html produced by our Story Telling workflow. We can later compare this to further edited versions.

http://ward.dojo.fed.wiki/assets/pages/story-telling/normalize-edits.html?dir=html HEIGHT 400

import * as norm from 'http://ward.dojo.fed.wiki/assets/pages/story-telling/norm.js' const ref = title => { const href = norm.select('a') .getAttribute('href') .split(/\/+/) return { type: "reference", id: "0511bca1b52a3f62", site: href[1], slug: norm.asSlug(title), title: title, text: "Source Wiki Page" } }

export const titles = () => { console.log(norm.div) const list = norm.selectAll("h2") .map(h2 => h2.firstChild.data) list.shift() return list }

export const items = (title,doitem) => { let d = norm.select('#'+norm.asSlug(title)) return [ref(title), ...norm.repeat(norm.more(d)) .map(doitem)] }