Skip to content

Instantly share code, notes, and snippets.

@amio
Last active June 22, 2016 10:49
Show Gist options
  • Save amio/cad657690e027e80a614f3ba2141397b to your computer and use it in GitHub Desktop.
Save amio/cad657690e027e80a614f3ba2141397b to your computer and use it in GitHub Desktop.
Generator for emoji.json
// Generate emoji.json from
// http://unicode.org/emoji/charts/full-emoji-list.html
{
const ids = $$('td.rchars')
const trs = ids.map(e => e.parentElement)
const db = trs.map(tr => {
const tds = tr.getElementsByTagName('td')
return {
no: tds[0].innerText,
code: tds[1].innerText.replace(/U\+/g, ''),
char: tds[2].innerText,
name: tds[15].innerText,
date: tds[16].innerText,
default: tds[17].innerText,
keywords: tds[18].innerText
}
})
copy(JSON.stringify(db, null, 2))
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment