Skip to content

Instantly share code, notes, and snippets.

@petehamilton
Last active June 2, 2017 16:28
Show Gist options
  • Save petehamilton/a6b1ca77a632cc1fbee7463cbb7fc419 to your computer and use it in GitHub Desktop.
Save petehamilton/a6b1ca77a632cc1fbee7463cbb7fc419 to your computer and use it in GitHub Desktop.
Postfacto -> Paper
// Copy the below into the browser's console on a Postfacto archive screen
(() => {
let components = [
`## Postfacto archive: ${window.location}`,
];
components = components.concat(
[
{ title: 'It wasn\'t so great that...', points: $$('.column-sad .item-text').map((el) => el.innerText) },
{ title: 'I\'m wondering about...', points: $$('.column-meh .item-text').map((el) => el.innerText) },
{ title: 'I\'m glad that...', points: $$('.column-happy .item-text').map((el) => el.innerText) },
]
.map((group) => {
const points = group.points.map((p) => `- ${p}\n`).join('');
return `## ${group.title} (${group.points.length})\n${points}`;
})
);
console.log(components.join('\n'));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment