Last active
June 22, 2016 10:49
-
-
Save amio/cad657690e027e80a614f3ba2141397b to your computer and use it in GitHub Desktop.
Generator for emoji.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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