Import Miro Graphs

After Exporting content from Miro, paste the contents of your clipboard below. Exporting Miro content is made easier with a Miro bookmarklet, which you can use by dragging and dropping one the #miro links below onto your bookmarks bar. Selection exports just what you have selected, the other bookmarklet exports the whole board.

https://robert.wiki.openlearning.cc/assets/bookmarklets-from-wiki/Miro%20bookmarklets.html HEIGHT 50

http://hsc.fed.wiki/assets/scripts/import-foreign-json.html HEIGHT 230

const node = e => ['card','sticky_note','text','preview'].includes(e.type) const rel = e => e.type == 'connector' const tag = e => e.type == 'tag' const cluster = e => e.type == 'frame' const text = t => t ? t .replaceAll(/<.*?>/g,'') .replaceAll(/[^\w ]/g,'') .slice(0,26) : 'empty'

json.filter(tag).forEach(e => { const name = text(e.title) nids[e.id] = graph.addNode(e.type,{name, ...e}) })

json.filter(node).forEach(e => { const name = text(e.title || (e.content || "Link")) nids[e.id] = graph.addNode(e.type,{name, ...e}) if (e.tagIds) { if (e.tagIds.length !== 0){ e.tagIds.forEach(item =>{ if(item in nids) graph.addRel('has tag',nids[e.id],nids[item]) }) } } })

json.filter(cluster).forEach(e => { const name = text(e.title || (e.content || "Link")) nids[e.id] = graph.addNode(e.type,{name}) e.childrenIds.forEach(item =>{ if(e.id in nids && item in nids) graph.addRel('cluster',nids[e.id],nids[item]) }) })

json.filter(rel).forEach(c => { const start = c.start?.item const end = c.end?.item if(start in nids && end in nids) graph.addRel(' ',nids[start],nids[end], {...c}) })