Skip to content

Instantly share code, notes, and snippets.

@0xced
Last active November 22, 2023 15:53
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save 0xced/f81c1ebbb75ce24c744c095b38aec9a4 to your computer and use it in GitHub Desktop.
Save 0xced/f81c1ebbb75ce24c744c095b38aec9a4 to your computer and use it in GitHub Desktop.
Extract emoji by category using the EmojiFoundation framework
{
"People" : [
"😀",
"😃",
"😄",
"😁",
"😆",
"😅",
"😂",
"🤣",
"☺️",
"😊",
"😇",
"🙂",
"🙃",
"😉",
"😌",
"😍",
"😘",
"😗",
"😙",
"😚",
"😋",
"😛",
"😝",
"😜",
"🤪",
"🤨",
"🧐",
"🤓",
"😎",
"🤩",
"😏",
"😒",
"😞",
"😔",
"😟",
"😕",
"🙁",
"☹️",
"😣",
"😖",
"😫",
"😩",
"😢",
"😭",
"😤",
"😠",
"😡",
"🤬",
"🤯",
"😳",
"😱",
"😨",
"😰",
"😥",
"😓",
"🤗",
"🤔",
"🤭",
"🤫",
"🤥",
"😶",
"😐",
"😑",
"😬",
"🙄",
"😯",
"😦",
"😧",
"😮",
"😲",
"😴",
"🤤",
"😪",
"😵",
"🤐",
"🤢",
"🤮",
"🤧",
"😷",
"🤒",
"🤕",
"🤑",
"🤠",
"😈",
"👿",
"👹",
"👺",
"🤡",
"💩",
"👻",
"💀",
"☠️",
"👽",
"👾",
"🤖",
"🎃",
"😺",
"😸",
"😹",
"😻",
"😼",
"😽",
"🙀",
"😿",
"😾",
"🤲",
"👐",
"🙌",
"👏",
"🤝",
"👍",
"👎",
"👊",
"✊",
"🤛",
"🤜",
"🤞",
"✌️",
"🤟",
"🤘",
"👌",
"👈",
"👉",
"👆",
"👇",
"☝️",
"✋",
"🤚",
"🖐",
"🖖",
"👋",
"🤙",
"💪",
"🖕",
"✍️",
"🙏",
"💍",
"💄",
"💋",
"👄",
"👅",
"👂",
"👃",
"👣",
"👁",
"👀",
"🧠",
"🗣",
"👤",
"👥",
"👶",
"👧",
"🧒",
"👦",
"👩",
"🧑",
"👨",
"👱‍♀️",
"👱‍♂️",
"🧔",
"👵",
"🧓",
"👴",
"👲",
"👳‍♀️",
"👳‍♂️",
"🧕",
"👮‍♀️",
"👮‍♂️",
"👷‍♀️",
"👷‍♂️",
"💂‍♀️",
"💂‍♂️",
"🕵️‍♀️",
"🕵️‍♂️",
"👩‍⚕️",
"👨‍⚕️",
"👩‍🌾",
"👨‍🌾",
"👩‍🍳",
"👨‍🍳",
"👩‍🎓",
"👨‍🎓",
"👩‍🎤",
"👨‍🎤",
"👩‍🏫",
"👨‍🏫",
"👩‍🏭",
"👨‍🏭",
"👩‍💻",
"👨‍💻",
"👩‍💼",
"👨‍💼",
"👩‍🔧",
"👨‍🔧",
"👩‍🔬",
"👨‍🔬",
"👩‍🎨",
"👨‍🎨",
"👩‍🚒",
"👨‍🚒",
"👩‍✈️",
"👨‍✈️",
"👩‍🚀",
"👨‍🚀",
"👩‍⚖️",
"👨‍⚖️",
"👰",
"🤵",
"👸",
"🤴",
"🤶",
"🎅",
"🧙‍♀️",
"🧙‍♂️",
"🧝‍♀️",
"🧝‍♂️",
"🧛‍♀️",
"🧛‍♂️",
"🧟‍♀️",
"🧟‍♂️",
"🧞‍♀️",
"🧞‍♂️",
"🧜‍♀️",
"🧜‍♂️",
"🧚‍♀️",
"🧚‍♂️",
"👼",
"🤰",
"🤱",
"🙇‍♀️",
"🙇‍♂️",
"💁‍♀️",
"💁‍♂️",
"🙅‍♀️",
"🙅‍♂️",
"🙆‍♀️",
"🙆‍♂️",
"🙋‍♀️",
"🙋‍♂️",
"🤦‍♀️",
"🤦‍♂️",
"🤷‍♀️",
"🤷‍♂️",
"🙎‍♀️",
"🙎‍♂️",
"🙍‍♀️",
"🙍‍♂️",
"💇‍♀️",
"💇‍♂️",
"💆‍♀️",
"💆‍♂️",
"🧖‍♀️",
"🧖‍♂️",
"💅",
"🤳",
"💃",
"🕺",
"👯‍♀️",
"👯‍♂️",
"🕴",
"🚶‍♀️",
"🚶‍♂️",
"🏃‍♀️",
"🏃‍♂️",
"👫",
"👭",
"👬",
"💑",
"👩‍❤️‍👩",
"👨‍❤️‍👨",
"💏",
"👩‍❤️‍💋‍👩",
"👨‍❤️‍💋‍👨",
"👪",
"👨‍👩‍👧",
"👨‍👩‍👧‍👦",
"👨‍👩‍👦‍👦",
"👨‍👩‍👧‍👧",
"👩‍👩‍👦",
"👩‍👩‍👧",
"👩‍👩‍👧‍👦",
"👩‍👩‍👦‍👦",
"👩‍👩‍👧‍👧",
"👨‍👨‍👦",
"👨‍👨‍👧",
"👨‍👨‍👧‍👦",
"👨‍👨‍👦‍👦",
"👨‍👨‍👧‍👧",
"👩‍👦",
"👩‍👧",
"👩‍👧‍👦",
"👩‍👦‍👦",
"👩‍👧‍👧",
"👨‍👦",
"👨‍👧",
"👨‍👧‍👦",
"👨‍👦‍👦",
"👨‍👧‍👧",
"🧥",
"👚",
"👕",
"👖",
"👔",
"👗",
"👙",
"👘",
"👠",
"👡",
"👢",
"👞",
"👟",
"🧦",
"🧤",
"🧣",
"🎩",
"🧢",
"👒",
"🎓",
"⛑",
"👑",
"👝",
"👛",
"👜",
"💼",
"🎒",
"👓",
"🕶",
"🌂"
],
"Activity" : [
"⚽️",
"🏀",
"🏈",
"⚾️",
"🎾",
"🏐",
"🏉",
"🎱",
"🏓",
"🏸",
"🥅",
"🏒",
"🏑",
"🏏",
"⛳️",
"🏹",
"🎣",
"🥊",
"🥋",
"🎽",
"⛸",
"🥌",
"🛷",
"🎿",
"⛷",
"🏂",
"🏋️‍♀️",
"🏋️‍♂️",
"🤼‍♀️",
"🤼‍♂️",
"🤸‍♀️",
"🤸‍♂️",
"⛹️‍♀️",
"⛹️‍♂️",
"🤺",
"🤾‍♀️",
"🤾‍♂️",
"🏌️‍♀️",
"🏌️‍♂️",
"🏇",
"🧘‍♀️",
"🧘‍♂️",
"🏄‍♀️",
"🏄‍♂️",
"🏊‍♀️",
"🏊‍♂️",
"🤽‍♀️",
"🤽‍♂️",
"🚣‍♀️",
"🚣‍♂️",
"🧗‍♀️",
"🧗‍♂️",
"🚵‍♀️",
"🚵‍♂️",
"🚴‍♀️",
"🚴‍♂️",
"🏆",
"🥇",
"🥈",
"🥉",
"🏅",
"🎖",
"🏵",
"🎗",
"🎫",
"🎟",
"🎪",
"🤹‍♀️",
"🤹‍♂️",
"🎭",
"🎨",
"🎬",
"🎤",
"🎧",
"🎼",
"🎹",
"🥁",
"🎷",
"🎺",
"🎸",
"🎻",
"🎲",
"🎯",
"🎳",
"🎮",
"🎰"
],
"Nature" : [
"🐶",
"🐱",
"🐭",
"🐹",
"🐰",
"🦊",
"🐻",
"🐼",
"🐨",
"🐯",
"🦁",
"🐮",
"🐷",
"🐽",
"🐸",
"🐵",
"🙈",
"🙉",
"🙊",
"🐒",
"🐔",
"🐧",
"🐦",
"🐤",
"🐣",
"🐥",
"🦆",
"🦅",
"🦉",
"🦇",
"🐺",
"🐗",
"🐴",
"🦄",
"🐝",
"🐛",
"🦋",
"🐌",
"🐚",
"🐞",
"🐜",
"🦗",
"🕷",
"🕸",
"🦂",
"🐢",
"🐍",
"🦎",
"🦖",
"🦕",
"🐙",
"🦑",
"🦐",
"🦀",
"🐡",
"🐠",
"🐟",
"🐬",
"🐳",
"🐋",
"🦈",
"🐊",
"🐅",
"🐆",
"🦓",
"🦍",
"🐘",
"🦏",
"🐪",
"🐫",
"🦒",
"🐃",
"🐂",
"🐄",
"🐎",
"🐖",
"🐏",
"🐑",
"🐐",
"🦌",
"🐕",
"🐩",
"🐈",
"🐓",
"🦃",
"🕊",
"🐇",
"🐁",
"🐀",
"🐿",
"🦔",
"🐾",
"🐉",
"🐲",
"🌵",
"🎄",
"🌲",
"🌳",
"🌴",
"🌱",
"🌿",
"☘️",
"🍀",
"🎍",
"🎋",
"🍃",
"🍂",
"🍁",
"🍄",
"🌾",
"💐",
"🌷",
"🌹",
"🥀",
"🌺",
"🌸",
"🌼",
"🌻",
"🌞",
"🌝",
"🌛",
"🌜",
"🌚",
"🌕",
"🌖",
"🌗",
"🌘",
"🌑",
"🌒",
"🌓",
"🌔",
"🌙",
"🌎",
"🌍",
"🌏",
"💫",
"⭐️",
"🌟",
"✨",
"⚡️",
"☄️",
"💥",
"🔥",
"🌪",
"🌈",
"☀️",
"🌤",
"⛅️",
"🌥",
"☁️",
"🌦",
"🌧",
"⛈",
"🌩",
"🌨",
"❄️",
"☃️",
"⛄️",
"🌬",
"💨",
"💧",
"💦",
"☔️",
"☂️",
"🌊",
"🌫"
],
"FoodAndDrink" : [
"🍏",
"🍎",
"🍐",
"🍊",
"🍋",
"🍌",
"🍉",
"🍇",
"🍓",
"🍈",
"🍒",
"🍑",
"🍍",
"🥥",
"🥝",
"🍅",
"🍆",
"🥑",
"🥦",
"🥒",
"🌶",
"🌽",
"🥕",
"🥔",
"🍠",
"🥐",
"🍞",
"🥖",
"🥨",
"🧀",
"🥚",
"🍳",
"🥞",
"🥓",
"🥩",
"🍗",
"🍖",
"🌭",
"🍔",
"🍟",
"🍕",
"🥪",
"🥙",
"🌮",
"🌯",
"🥗",
"🥘",
"🥫",
"🍝",
"🍜",
"🍲",
"🍛",
"🍣",
"🍱",
"🍤",
"🍙",
"🍚",
"🍘",
"🍥",
"🥠",
"🍢",
"🍡",
"🍧",
"🍨",
"🍦",
"🥧",
"🍰",
"🎂",
"🍮",
"🍭",
"🍬",
"🍫",
"🍿",
"🍩",
"🥟",
"🍪",
"🌰",
"🥜",
"🍯",
"🥛",
"🍼",
"☕️",
"🍵",
"🥤",
"🍶",
"🍺",
"🍻",
"🥂",
"🍷",
"🥃",
"🍸",
"🍹",
"🍾",
"🥄",
"🍴",
"🍽",
"🥣",
"🥡",
"🥢"
],
"Objects" : [
"⌚️",
"📱",
"📲",
"💻",
"⌨️",
"🖥",
"🖨",
"🖱",
"🖲",
"🕹",
"🗜",
"💽",
"💾",
"💿",
"📀",
"📼",
"📷",
"📸",
"📹",
"🎥",
"📽",
"🎞",
"📞",
"☎️",
"📟",
"📠",
"📺",
"📻",
"🎙",
"🎚",
"🎛",
"⏱",
"⏲",
"⏰",
"🕰",
"⌛️",
"⏳",
"📡",
"🔋",
"🔌",
"💡",
"🔦",
"🕯",
"🗑",
"🛢",
"💸",
"💵",
"💴",
"💶",
"💷",
"💰",
"💳",
"💎",
"⚖️",
"🔧",
"🔨",
"⚒",
"🛠",
"⛏",
"🔩",
"⚙️",
"⛓",
"🔫",
"💣",
"🔪",
"🗡",
"⚔️",
"🛡",
"🚬",
"⚰️",
"⚱️",
"🏺",
"🔮",
"📿",
"💈",
"⚗️",
"🔭",
"🔬",
"🕳",
"💊",
"💉",
"🌡",
"🚽",
"🚰",
"🚿",
"🛁",
"🛀",
"🛎",
"🔑",
"🗝",
"🚪",
"🛋",
"🛏",
"🛌",
"🖼",
"🛍",
"🛒",
"🎁",
"🎈",
"🎏",
"🎀",
"🎊",
"🎉",
"🎎",
"🏮",
"🎐",
"✉️",
"📩",
"📨",
"📧",
"💌",
"📥",
"📤",
"📦",
"🏷",
"📪",
"📫",
"📬",
"📭",
"📮",
"📯",
"📜",
"📃",
"📄",
"📑",
"📊",
"📈",
"📉",
"🗒",
"🗓",
"📆",
"📅",
"📇",
"🗃",
"🗳",
"🗄",
"📋",
"📁",
"📂",
"🗂",
"🗞",
"📰",
"📓",
"📔",
"📒",
"📕",
"📗",
"📘",
"📙",
"📚",
"📖",
"🔖",
"🔗",
"📎",
"🖇",
"📐",
"📏",
"📌",
"📍",
"✂️",
"🖊",
"🖋",
"✒️",
"🖌",
"🖍",
"📝",
"✏️",
"🔍",
"🔎",
"🔏",
"🔐",
"🔒",
"🔓"
],
"Flags" : [
"🏳️",
"🏴",
"🏁",
"🚩",
"🏳️‍🌈",
"🇦🇫",
"🇦🇽",
"🇦🇱",
"🇩🇿",
"🇦🇸",
"🇦🇩",
"🇦🇴",
"🇦🇮",
"🇦🇶",
"🇦🇬",
"🇦🇷",
"🇦🇲",
"🇦🇼",
"🇦🇺",
"🇦🇹",
"🇦🇿",
"🇧🇸",
"🇧🇭",
"🇧🇩",
"🇧🇧",
"🇧🇾",
"🇧🇪",
"🇧🇿",
"🇧🇯",
"🇧🇲",
"🇧🇹",
"🇧🇴",
"🇧🇦",
"🇧🇼",
"🇧🇷",
"🇮🇴",
"🇻🇬",
"🇧🇳",
"🇧🇬",
"🇧🇫",
"🇧🇮",
"🇰🇭",
"🇨🇲",
"🇨🇦",
"🇮🇨",
"🇨🇻",
"🇧🇶",
"🇰🇾",
"🇨🇫",
"🇹🇩",
"🇨🇱",
"🇨🇳",
"🇨🇽",
"🇨🇨",
"🇨🇴",
"🇰🇲",
"🇨🇬",
"🇨🇩",
"🇨🇰",
"🇨🇷",
"🇨🇮",
"🇭🇷",
"🇨🇺",
"🇨🇼",
"🇨🇾",
"🇨🇿",
"🇩🇰",
"🇩🇯",
"🇩🇲",
"🇩🇴",
"🇪🇨",
"🇪🇬",
"🇸🇻",
"🇬🇶",
"🇪🇷",
"🇪🇪",
"🇪🇹",
"🇪🇺",
"🇫🇰",
"🇫🇴",
"🇫🇯",
"🇫🇮",
"🇫🇷",
"🇬🇫",
"🇵🇫",
"🇹🇫",
"🇬🇦",
"🇬🇲",
"🇬🇪",
"🇩🇪",
"🇬🇭",
"🇬🇮",
"🇬🇷",
"🇬🇱",
"🇬🇩",
"🇬🇵",
"🇬🇺",
"🇬🇹",
"🇬🇬",
"🇬🇳",
"🇬🇼",
"🇬🇾",
"🇭🇹",
"🇭🇳",
"🇭🇰",
"🇭🇺",
"🇮🇸",
"🇮🇳",
"🇮🇩",
"🇮🇷",
"🇮🇶",
"🇮🇪",
"🇮🇲",
"🇮🇱",
"🇮🇹",
"🇯🇲",
"🇯🇵",
"🎌",
"🇯🇪",
"🇯🇴",
"🇰🇿",
"🇰🇪",
"🇰🇮",
"🇽🇰",
"🇰🇼",
"🇰🇬",
"🇱🇦",
"🇱🇻",
"🇱🇧",
"🇱🇸",
"🇱🇷",
"🇱🇾",
"🇱🇮",
"🇱🇹",
"🇱🇺",
"🇲🇴",
"🇲🇰",
"🇲🇬",
"🇲🇼",
"🇲🇾",
"🇲🇻",
"🇲🇱",
"🇲🇹",
"🇲🇭",
"🇲🇶",
"🇲🇷",
"🇲🇺",
"🇾🇹",
"🇲🇽",
"🇫🇲",
"🇲🇩",
"🇲🇨",
"🇲🇳",
"🇲🇪",
"🇲🇸",
"🇲🇦",
"🇲🇿",
"🇲🇲",
"🇳🇦",
"🇳🇷",
"🇳🇵",
"🇳🇱",
"🇳🇨",
"🇳🇿",
"🇳🇮",
"🇳🇪",
"🇳🇬",
"🇳🇺",
"🇳🇫",
"🇰🇵",
"🇲🇵",
"🇳🇴",
"🇴🇲",
"🇵🇰",
"🇵🇼",
"🇵🇸",
"🇵🇦",
"🇵🇬",
"🇵🇾",
"🇵🇪",
"🇵🇭",
"🇵🇳",
"🇵🇱",
"🇵🇹",
"🇵🇷",
"🇶🇦",
"🇷🇪",
"🇷🇴",
"🇷🇺",
"🇷🇼",
"🇼🇸",
"🇸🇲",
"🇸🇹",
"🇸🇦",
"🇸🇳",
"🇷🇸",
"🇸🇨",
"🇸🇱",
"🇸🇬",
"🇸🇽",
"🇸🇰",
"🇸🇮",
"🇬🇸",
"🇸🇧",
"🇸🇴",
"🇿🇦",
"🇰🇷",
"🇸🇸",
"🇪🇸",
"🇱🇰",
"🇧🇱",
"🇸🇭",
"🇰🇳",
"🇱🇨",
"🇵🇲",
"🇻🇨",
"🇸🇩",
"🇸🇷",
"🇸🇿",
"🇸🇪",
"🇨🇭",
"🇸🇾",
"🇹🇯",
"🇹🇿",
"🇹🇭",
"🇹🇱",
"🇹🇬",
"🇹🇰",
"🇹🇴",
"🇹🇹",
"🇹🇳",
"🇹🇷",
"🇹🇲",
"🇹🇨",
"🇹🇻",
"🇻🇮",
"🇺🇬",
"🇺🇦",
"🇦🇪",
"🇬🇧",
"🏴󠁧󠁢󠁥󠁮󠁧󠁿",
"🏴󠁧󠁢󠁳󠁣󠁴󠁿",
"🏴󠁧󠁢󠁷󠁬󠁳󠁿",
"🇺🇸",
"🇺🇾",
"🇺🇿",
"🇻🇺",
"🇻🇦",
"🇻🇪",
"🇻🇳",
"🇼🇫",
"🇪🇭",
"🇾🇪",
"🇿🇲",
"🇿🇼"
],
"Symbols" : [
"❤️",
"🧡",
"💛",
"💚",
"💙",
"💜",
"🖤",
"💔",
"❣️",
"💕",
"💞",
"💓",
"💗",
"💖",
"💘",
"💝",
"💟",
"☮️",
"✝️",
"☪️",
"🕉",
"☸️",
"✡️",
"🔯",
"🕎",
"☯️",
"☦️",
"🛐",
"⛎",
"♈️",
"♉️",
"♊️",
"♋️",
"♌️",
"♍️",
"♎️",
"♏️",
"♐️",
"♑️",
"♒️",
"♓️",
"🆔",
"⚛️",
"🉑",
"☢️",
"☣️",
"📴",
"📳",
"🈶",
"🈚️",
"🈸",
"🈺",
"🈷️",
"✴️",
"🆚",
"💮",
"🉐",
"㊙️",
"㊗️",
"🈴",
"🈵",
"🈹",
"🈲",
"🅰️",
"🅱️",
"🆎",
"🆑",
"🅾️",
"🆘",
"❌",
"⭕️",
"🛑",
"⛔️",
"📛",
"🚫",
"💯",
"💢",
"♨️",
"🚷",
"🚯",
"🚳",
"🚱",
"🔞",
"📵",
"🚭",
"❗️",
"❕",
"❓",
"❔",
"‼️",
"⁉️",
"🔅",
"🔆",
"〽️",
"⚠️",
"🚸",
"🔱",
"⚜️",
"🔰",
"♻️",
"✅",
"🈯️",
"💹",
"❇️",
"✳️",
"❎",
"🌐",
"💠",
"Ⓜ️",
"🌀",
"💤",
"🏧",
"🚾",
"♿️",
"🅿️",
"🈳",
"🈂️",
"🛂",
"🛃",
"🛄",
"🛅",
"🚹",
"🚺",
"🚼",
"🚻",
"🚮",
"🎦",
"📶",
"🈁",
"🔣",
"ℹ️",
"🔤",
"🔡",
"🔠",
"🆖",
"🆗",
"🆙",
"🆒",
"🆕",
"🆓",
"0️⃣",
"1️⃣",
"2️⃣",
"3️⃣",
"4️⃣",
"5️⃣",
"6️⃣",
"7️⃣",
"8️⃣",
"9️⃣",
"🔟",
"🔢",
"#️⃣",
"*️⃣",
"⏏️",
"▶️",
"⏸",
"⏯",
"⏹",
"⏺",
"⏭",
"⏮",
"⏩",
"⏪",
"⏫",
"⏬",
"◀️",
"🔼",
"🔽",
"➡️",
"⬅️",
"⬆️",
"⬇️",
"↗️",
"↘️",
"↙️",
"↖️",
"↕️",
"↔️",
"↪️",
"↩️",
"⤴️",
"⤵️",
"🔀",
"🔁",
"🔂",
"🔄",
"🔃",
"🎵",
"🎶",
"➕",
"➖",
"➗",
"✖️",
"💲",
"💱",
"™️",
"©️",
"®️",
"〰️",
"➰",
"➿",
"🔚",
"🔙",
"🔛",
"🔝",
"🔜",
"✔️",
"☑️",
"🔘",
"⚪️",
"⚫️",
"🔴",
"🔵",
"🔺",
"🔻",
"🔸",
"🔹",
"🔶",
"🔷",
"🔳",
"🔲",
"▪️",
"▫️",
"◾️",
"◽️",
"◼️",
"◻️",
"⬛️",
"⬜️",
"🔈",
"🔇",
"🔉",
"🔊",
"🔔",
"🔕",
"📣",
"📢",
"👁‍🗨",
"💬",
"💭",
"🗯",
"♠️",
"♣️",
"♥️",
"♦️",
"🃏",
"🎴",
"🀄️",
"🕐",
"🕑",
"🕒",
"🕓",
"🕔",
"🕕",
"🕖",
"🕗",
"🕘",
"🕙",
"🕚",
"🕛",
"🕜",
"🕝",
"🕞",
"🕟",
"🕠",
"🕡",
"🕢",
"🕣",
"🕤",
"🕥",
"🕦",
"🕧"
],
"TravelAndPlaces" : [
"🚗",
"🚕",
"🚙",
"🚌",
"🚎",
"🏎",
"🚓",
"🚑",
"🚒",
"🚐",
"🚚",
"🚛",
"🚜",
"🛴",
"🚲",
"🛵",
"🏍",
"🚨",
"🚔",
"🚍",
"🚘",
"🚖",
"🚡",
"🚠",
"🚟",
"🚃",
"🚋",
"🚞",
"🚝",
"🚄",
"🚅",
"🚈",
"🚂",
"🚆",
"🚇",
"🚊",
"🚉",
"✈️",
"🛫",
"🛬",
"🛩",
"💺",
"🛰",
"🚀",
"🛸",
"🚁",
"🛶",
"⛵️",
"🚤",
"🛥",
"🛳",
"⛴",
"🚢",
"⚓️",
"⛽️",
"🚧",
"🚦",
"🚥",
"🚏",
"🗺",
"🗿",
"🗽",
"🗼",
"🏰",
"🏯",
"🏟",
"🎡",
"🎢",
"🎠",
"⛲️",
"⛱",
"🏖",
"🏝",
"🏜",
"🌋",
"⛰",
"🏔",
"🗻",
"🏕",
"⛺️",
"🏠",
"🏡",
"🏘",
"🏚",
"🏗",
"🏭",
"🏢",
"🏬",
"🏣",
"🏤",
"🏥",
"🏦",
"🏨",
"🏪",
"🏫",
"🏩",
"💒",
"🏛",
"⛪️",
"🕌",
"🕍",
"🕋",
"⛩",
"🛤",
"🛣",
"🗾",
"🎑",
"🏞",
"🌅",
"🌄",
"🌠",
"🎇",
"🎆",
"🌇",
"🌆",
"🏙",
"🌃",
"🌌",
"🌉",
"🌁"
]
}
#import <Foundation/Foundation.h>
@interface NSObject (EMFEmojiCategory)
- (NSArray *) categoryIdentifierList;
- (NSArray *) _emojiSetForIdentifier:(NSString *)identifier;
@end
int ExtractEmoji(NSString *emojiFoundationPath)
{
NSBundle *emojiFoundationBundle = [NSBundle bundleWithURL:[NSURL fileURLWithPath:emojiFoundationPath]];
if (!emojiFoundationBundle)
{
NSLog(@"The EmojiFoundation framework does not exist at %@", emojiFoundationPath);
return 1;
}
NSError *loadError;
if (![emojiFoundationBundle loadAndReturnError:&loadError])
{
NSLog(@"Failed to load %@: %@", emojiFoundationBundle, loadError);
return 2;
}
Class EMFEmojiCategory = NSClassFromString(@"EMFEmojiCategory");
if (!EMFEmojiCategory)
{
NSLog(@"EMFEmojiCategory class not found.");
return 3;
}
NSArray *categoryIdentifiers = [EMFEmojiCategory categoryIdentifierList];
if (categoryIdentifiers.count == 0)
{
NSLog(@"+[EMFEmojiCategory categoryIdentifierList] returned an empty list.");
return 4;
}
NSMutableDictionary *emoji = [NSMutableDictionary new];
for (NSString *categoryIdentifier in categoryIdentifiers)
{
NSString *identifier = [categoryIdentifier stringByReplacingOccurrencesOfString:@"EMFEmojiCategory" withString:@""];
NSArray *emojiSet = [EMFEmojiCategory _emojiSetForIdentifier:categoryIdentifier];
if (emojiSet.count > 0)
emoji[identifier] = emojiSet;
}
NSError *writeError;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:emoji options:NSJSONWritingPrettyPrinted error:&writeError];
if (jsonData)
{
NSString *json = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
printf("%s", json.UTF8String);
}
else
{
NSLog(@"Failed to serialize emoji dictionary: %@", writeError);
return 5;
}
return 0;
}
int main(int argc, const char * argv[])
{
@autoreleasepool
{
NSString *emojiFoundationPath = argc >= 2 ? @(argv[1]) : @"/System/Library/PrivateFrameworks/EmojiFoundation.framework";
return ExtractEmoji(emojiFoundationPath);
}
}
default: EmojiFoundationExtractor
./EmojiFoundationExtractor > Emoji.json
EmojiFoundationExtractor:
clang $@.m -o $@ -fobjc-arc
clean:
rm -f EmojiFoundationExtractor
@nst
Copy link

nst commented Jan 19, 2018

FWIW, a Python version:

#!/usr/bin/env python2.7

from Foundation import NSBundle, NSClassFromString
import json, io

NSBundle.bundleWithPath_("/System/Library/PrivateFrameworks/EmojiFoundation.framework").load()

EC = NSClassFromString("EMFEmojiCategory")

ids = EC.categoryIdentifierList()

d = {id.lstrip("EMFEmojiCategory"): list(EC._emojiSetForIdentifier_(id)) for id in ids}

with io.open('out.json', 'w') as f:
    f.write(unicode(json.dumps(d, indent=4, ensure_ascii=False)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment