├── .prettierrc ├── .gitignore ├── ogp ├── ogp.png └── ogp.xcf ├── .editorconfig ├── gallery-site ├── _data │ ├── siteUrl.js │ └── emojis.js ├── _includes │ ├── download-link.js │ └── css.css ├── archive │ └── index.11ty.js ├── feed.njk └── index.njk ├── emojis ├── thinking_無.png ├── three_eyes.png ├── chaining_face.png ├── dinging_face.png ├── fighting_face.png ├── linking_face.png ├── oinking_face.png ├── picking_face.png ├── reading_dead.png ├── reading_face.png ├── ringing_face.png ├── singing_face.png ├── thinking_beer.png ├── thinking_bomb.png ├── thinking_bulb.png ├── thinking_dead.png ├── thinking_eyes.png ├── thinking_fire.png ├── thinking_frog.png ├── thinking_link.png ├── thinking_ogre.png ├── thinking_pien.png ├── writing_face.png ├── shrinking_face.png ├── thinking_brain.png ├── thinking_cloud.png ├── thinking_dango.png ├── thinking_dead2.png ├── thinking_devil.png ├── thinking_knife.png ├── thinking_skull.png ├── thinking_sleep.png ├── thinking_computer.png ├── thinking_pleading.png ├── dotted_thinking_face.png ├── thinking_anxious_face.png ├── thinking_dizzy_face.png ├── thinking_melting_face.png ├── thinking_money_face.png ├── thinking_rolling_eyes.png ├── slightly_smiling_angry.png ├── thinking_exploding_head.png ├── shushing_with_money_face.png ├── slightly_smiling_fearful.png ├── thinking_looking_back_face.png ├── thinking_money_with_wings.png ├── screaming_face_looking_right.png ├── thinking_face_with_sunglasses.png ├── thinking_face_with_sunglasses_gun.png ├── slightly_smiling_fearful.svg ├── screaming_face_looking_right.svg ├── thinking_fire.svg ├── thinking_looking_back_face.svg ├── slightly_smiling_angry.svg ├── three_eyes.svg ├── thinking_pien.svg ├── thinking_devil.svg ├── thinking_rolling_eyes.svg ├── thinking_anxious_face.svg ├── dinging_face.svg ├── thinking_dizzy_face.svg ├── dotted_thinking_face.svg ├── thinking_melting_face.svg ├── thinking_cloud.svg ├── picking_face.svg ├── thinking_eyes.svg ├── thinking_face_with_sunglasses.svg ├── thinking_frog.svg ├── thinking_computer.svg ├── thinking_link.svg ├── oinking_face.svg ├── linking_face.svg ├── thinking_bomb.svg ├── thinking_money_face.svg ├── reading_face.svg ├── thinking_bulb.svg ├── thinking_knife.svg ├── thinking_beer.svg ├── ringing_face.svg ├── thinking_skull.svg ├── shrinking_face.svg ├── singing_face.svg ├── thinking_dead.svg ├── writing_face.svg └── thinking_dead2.svg ├── package.json ├── README.md └── .eleventy.js /.prettierrc: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /_site -------------------------------------------------------------------------------- /ogp/ogp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/ogp/ogp.png -------------------------------------------------------------------------------- /ogp/ogp.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/ogp/ogp.xcf -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_size = 2 5 | indent_style = space -------------------------------------------------------------------------------- /gallery-site/_data/siteUrl.js: -------------------------------------------------------------------------------- 1 | module.exports = "https://custom-emojis.uhyo.space" -------------------------------------------------------------------------------- /emojis/thinking_無.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_無.png -------------------------------------------------------------------------------- /emojis/three_eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/three_eyes.png -------------------------------------------------------------------------------- /emojis/chaining_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/chaining_face.png -------------------------------------------------------------------------------- /emojis/dinging_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/dinging_face.png -------------------------------------------------------------------------------- /emojis/fighting_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/fighting_face.png -------------------------------------------------------------------------------- /emojis/linking_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/linking_face.png -------------------------------------------------------------------------------- /emojis/oinking_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/oinking_face.png -------------------------------------------------------------------------------- /emojis/picking_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/picking_face.png -------------------------------------------------------------------------------- /emojis/reading_dead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/reading_dead.png -------------------------------------------------------------------------------- /emojis/reading_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/reading_face.png -------------------------------------------------------------------------------- /emojis/ringing_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/ringing_face.png -------------------------------------------------------------------------------- /emojis/singing_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/singing_face.png -------------------------------------------------------------------------------- /emojis/thinking_beer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_beer.png -------------------------------------------------------------------------------- /emojis/thinking_bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_bomb.png -------------------------------------------------------------------------------- /emojis/thinking_bulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_bulb.png -------------------------------------------------------------------------------- /emojis/thinking_dead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_dead.png -------------------------------------------------------------------------------- /emojis/thinking_eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_eyes.png -------------------------------------------------------------------------------- /emojis/thinking_fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_fire.png -------------------------------------------------------------------------------- /emojis/thinking_frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_frog.png -------------------------------------------------------------------------------- /emojis/thinking_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_link.png -------------------------------------------------------------------------------- /emojis/thinking_ogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_ogre.png -------------------------------------------------------------------------------- /emojis/thinking_pien.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_pien.png -------------------------------------------------------------------------------- /emojis/writing_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/writing_face.png -------------------------------------------------------------------------------- /emojis/shrinking_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/shrinking_face.png -------------------------------------------------------------------------------- /emojis/thinking_brain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_brain.png -------------------------------------------------------------------------------- /emojis/thinking_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_cloud.png -------------------------------------------------------------------------------- /emojis/thinking_dango.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_dango.png -------------------------------------------------------------------------------- /emojis/thinking_dead2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_dead2.png -------------------------------------------------------------------------------- /emojis/thinking_devil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_devil.png -------------------------------------------------------------------------------- /emojis/thinking_knife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_knife.png -------------------------------------------------------------------------------- /emojis/thinking_skull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_skull.png -------------------------------------------------------------------------------- /emojis/thinking_sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_sleep.png -------------------------------------------------------------------------------- /emojis/thinking_computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_computer.png -------------------------------------------------------------------------------- /emojis/thinking_pleading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_pleading.png -------------------------------------------------------------------------------- /emojis/dotted_thinking_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/dotted_thinking_face.png -------------------------------------------------------------------------------- /emojis/thinking_anxious_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_anxious_face.png -------------------------------------------------------------------------------- /emojis/thinking_dizzy_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_dizzy_face.png -------------------------------------------------------------------------------- /emojis/thinking_melting_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_melting_face.png -------------------------------------------------------------------------------- /emojis/thinking_money_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_money_face.png -------------------------------------------------------------------------------- /emojis/thinking_rolling_eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_rolling_eyes.png -------------------------------------------------------------------------------- /emojis/slightly_smiling_angry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/slightly_smiling_angry.png -------------------------------------------------------------------------------- /emojis/thinking_exploding_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_exploding_head.png -------------------------------------------------------------------------------- /emojis/shushing_with_money_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/shushing_with_money_face.png -------------------------------------------------------------------------------- /emojis/slightly_smiling_fearful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/slightly_smiling_fearful.png -------------------------------------------------------------------------------- /emojis/thinking_looking_back_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_looking_back_face.png -------------------------------------------------------------------------------- /emojis/thinking_money_with_wings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_money_with_wings.png -------------------------------------------------------------------------------- /emojis/screaming_face_looking_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/screaming_face_looking_right.png -------------------------------------------------------------------------------- /emojis/thinking_face_with_sunglasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_face_with_sunglasses.png -------------------------------------------------------------------------------- /emojis/thinking_face_with_sunglasses_gun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uhyo/custom-emojis/HEAD/emojis/thinking_face_with_sunglasses_gun.png -------------------------------------------------------------------------------- /gallery-site/_includes/download-link.js: -------------------------------------------------------------------------------- 1 | const png = document.querySelector("#download-png"); 2 | const svg = document.querySelector("#download-svg"); 3 | 4 | function setDownloadLink() { 5 | const extList = []; 6 | if (png.checked) { 7 | extList.push("png"); 8 | } 9 | if (svg.checked) { 10 | extList.push("svg"); 11 | } 12 | 13 | const link = document.querySelector("#download-link"); 14 | link.href = `/archive/emoji${extList.map(ext => `-${ext}`).join("")}.zip`; 15 | } 16 | 17 | setDownloadLink(); 18 | png.addEventListener("change", setDownloadLink); 19 | svg.addEventListener("change", setDownloadLink); -------------------------------------------------------------------------------- /gallery-site/_includes/css.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | } 4 | 5 | .emoji-list { 6 | display: grid; 7 | grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 8 | grid-auto-columns: auto; 9 | grid-auto-flow: row; 10 | gap: 16px; 11 | } 12 | 13 | .emoji { 14 | display: flex; 15 | flex-flow: column; 16 | justify-content: space-between; 17 | align-items: center; 18 | text-align: center; 19 | } 20 | 21 | #download-link { 22 | padding: 0.75em; 23 | border: 1px solid #ccc; 24 | border-radius: 8px; 25 | text-decoration: none; 26 | color: rgb(51, 113, 218); 27 | } 28 | 29 | .download-type { 30 | margin: 0 0.5em; 31 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-emoji", 3 | "version": "1.0.0", 4 | "description": "Custom emojis we find useful on Slack.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "eleventy", 9 | "build-cloudflare-pages": "git fetch --unshallow && npm run build", 10 | "serve": "eleventy --serve" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/uhyo/custom-emojis.git" 15 | }, 16 | "keywords": [], 17 | "author": "uhyo ", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/uhyo/custom-emojis/issues" 21 | }, 22 | "homepage": "https://github.com/uhyo/custom-emojis#readme", 23 | "devDependencies": { 24 | "@11ty/eleventy": "^1.0.0", 25 | "@11ty/eleventy-plugin-rss": "^1.1.2", 26 | "clean-css": "^5.2.4", 27 | "html-minifier": "^4.0.0", 28 | "prettier": "^2.5.1", 29 | "terser": "^5.10.0" 30 | } 31 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Custom emojis we find useful on Slack. 2 | 3 | [Gallery](https://custom-emojis.uhyo.space/) 4 | 5 | ## Top Emojis 6 | 7 | | 1 | 2 | 3 | 8 | | :------------------------------------------: | :------------------------------------------: | :----------------------------------------: | 9 | | ![thinking_sleep](emojis/thinking_sleep.png) | ![thinking_skull](emojis/thinking_skull.png) | ![thinking_eyes](emojis/thinking_eyes.png) | 10 | | thinking_sleep | thinking_skull | thinking_eyes | 11 | 12 | ## Contributing 13 | 14 | Welcome 15 | 16 | **License Agreement**: by submitting your work to this repository, you agree to license it under CC-BY 4.0. 17 | 18 | ## License & Attributon 19 | 20 | This work is licensed under CC-BY 4.0. 21 | 22 | This work is based on [Twemoji](https://github.com/twitter/twemoji). 23 | -------------------------------------------------------------------------------- /gallery-site/archive/index.11ty.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const util = require('util'); 3 | const execFile = util.promisify(require('child_process').execFile); 4 | 5 | exports.data = { 6 | pagination: { 7 | data: "extensions", 8 | size: 1 9 | }, 10 | extensions: [ 11 | [], 12 | ["png"], 13 | ["svg"], 14 | ["png", "svg"] 15 | ], 16 | permalink: ({ pagination: { items: [extensions] } }) => `archive/emoji${extensions.map(ext => `-${ext}`).join("")}.zip` 17 | } 18 | 19 | exports.render = async (data) => { 20 | const { pagination: { items: [extensions] } } = data; 21 | const rootDir = path.join(__dirname, "../../"); 22 | const { stdout } = await execFile("zip", [ 23 | /* recursive */ "-r", 24 | /* do not compress png */ "-n", ".png", 25 | /* output */ "-", 26 | /* input */ "emojis", 27 | /* specify target files */ "--include", ...( 28 | extensions.length === 0 ? ["*.nothing"] : 29 | extensions.map(ext => `*${ext}`)) 30 | ], { 31 | cwd: rootDir, 32 | encoding: "buffer" 33 | }) 34 | return stdout 35 | } -------------------------------------------------------------------------------- /gallery-site/feed.njk: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: "feed.xml" 3 | --- 4 | 5 | 6 | {{siteUrl}}/feed.xml 7 | custom-emoji gallery 8 | 9 | 10 | 11 | uhyo 12 | 13 | {{ emojis.history | getNewestCollectionItemDate | dateToRfc3339 }} 14 | {% for update in emojis.history %} 15 | 16 | {{ siteUrl }}{{ update.url }}#{{ update.hash }} 17 | 18 | {{ update.emojiName }} 19 | {{ update.date | dateToRfc3339 }} 20 | 21 |

{{ update.emojiName }} was {% 22 | if update.type === "add" %}added{% 23 | elif update.type === "modify" %}updated{% 24 | endif %}!

25 | ]]> 26 |
27 |
28 | {% endfor %} 29 |
-------------------------------------------------------------------------------- /.eleventy.js: -------------------------------------------------------------------------------- 1 | const htmlmin = require("html-minifier"); 2 | const CleanCSS = require("clean-css"); 3 | const { minify } = require("terser"); 4 | const pluginRss = require('@11ty/eleventy-plugin-rss') 5 | 6 | module.exports = function (eleventyConfig) { 7 | eleventyConfig.addPlugin(pluginRss); 8 | 9 | eleventyConfig.addPassthroughCopy("emojis/*.png") 10 | eleventyConfig.addPassthroughCopy("ogp/ogp.png") 11 | 12 | eleventyConfig.addFilter("cssmin", function (code) { 13 | return new CleanCSS({}).minify(code).styles; 14 | }); 15 | eleventyConfig.addNunjucksAsyncFilter("jsmin", async function ( 16 | code, 17 | callback 18 | ) { 19 | try { 20 | const minified = await minify(code); 21 | callback(null, minified.code); 22 | } catch (err) { 23 | console.error("Terser error: ", err); 24 | callback(null, code); 25 | } 26 | }); 27 | 28 | eleventyConfig.addTransform("htmlmin", function (content) { 29 | if (this.outputPath && this.outputPath.endsWith(".html")) { 30 | const minified = htmlmin.minify(content, { 31 | useShortDoctype: true, 32 | removeComments: true, 33 | collapseWhitespace: true 34 | }); 35 | return minified; 36 | } 37 | 38 | return content; 39 | }); 40 | 41 | return { 42 | dir: { 43 | input: "gallery-site", 44 | output: "_site" 45 | } 46 | } 47 | }; -------------------------------------------------------------------------------- /gallery-site/index.njk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | custom-emoji gallery 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% set css %} 15 | {% include "css.css" %} 16 | {% endset %} 17 | 18 | 19 | 20 |

custom-emoji gallery

21 |

These are custom emojis that enriches your Slack experience.

22 |

23 | Download all emojis 24 | 28 | 32 |

33 |
34 | {% for emoji in emojis.emojis %} 35 |
36 | {{emoji.name | replace("_", "_") | safe}} 37 | {{emoji.name}} 38 |
39 | {% endfor %} 40 |
41 |

License

42 |

This work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

43 |

This work is based on Twemoji.

44 |

References

45 |

GitHub repository

46 |

Contribution is welcome!

47 | {% set downloadLinkJs %} 48 | {% include "download-link.js" %} 49 | {% endset %} 50 | 51 | 52 | -------------------------------------------------------------------------------- /emojis/slightly_smiling_fearful.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 59 | 63 | 70 | 77 | 81 | 82 | -------------------------------------------------------------------------------- /emojis/screaming_face_looking_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 68 | -------------------------------------------------------------------------------- /gallery-site/_data/emojis.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | const path = require("path"); 4 | const fs = require("fs/promises"); 5 | const util = require("util"); 6 | const child_process = require("child_process"); 7 | 8 | module.exports = async () => { 9 | const emojisDir = path.join(__dirname, "../../emojis"); 10 | // get all .png files in the dir 11 | const read = await fs.readdir(emojisDir); 12 | const files = read.filter((file) => file.endsWith(".png")); 13 | const emojis = files.sort().map((file) => { 14 | const name = file.slice(0, -4); 15 | return { 16 | name, 17 | url: `/emojis/${encodeURIComponent(file)}`, 18 | }; 19 | }); 20 | 21 | const emojiUrls = new Map(emojis.map(emoji => [emoji.name, emoji.url])); 22 | 23 | const history = await getEmojiHistory(emojisDir, emojiUrls); 24 | 25 | console.log(history) 26 | return { 27 | emojisDir, 28 | emojis, 29 | history, 30 | }; 31 | }; 32 | 33 | /** 34 | * @param {string} emojisDir 35 | * @param {Map} emojiUrls 36 | */ 37 | async function getEmojiHistory(emojisDir, emojiUrls) { 38 | const { stdout: gitlog } = await util.promisify(child_process.exec)( 39 | `git log --name-status --format=format:"commit %H %ad" --date=iso8601-strict --relative -- "*.png"`, 40 | { 41 | cwd: emojisDir 42 | } 43 | ) 44 | // Example output: 45 | // commit a219d6201d7c42cf16b9b4ee2272fb17ad219cb8 2022-03-04T21:02:01+09:00 46 | // A writing_face.png 47 | // 48 | // commit 5932ed7164bd6854d911a8316f83cb25ed27a85f 2022-02-06T14:10:53+09:00 49 | // M reading_face.png 50 | // M reading_face.svg 51 | 52 | const history = []; 53 | let currentCommitTime = undefined 54 | let currentCommitHash = "" 55 | 56 | const lines = gitlog.split("\n"); 57 | for (const line of lines) { 58 | if (line.startsWith("commit ")) { 59 | [, currentCommitHash, currentCommitTime] = line.split(" ") 60 | currentCommitTime = new Date(currentCommitTime); 61 | continue; 62 | } 63 | if (!currentCommitTime) { 64 | continue; 65 | } 66 | if (line.startsWith("A")) { 67 | const emojiName = getEmojiName(line.slice(1).trim()).replace(/\.png$/, ""); 68 | history.push({ 69 | type: "add", 70 | emojiName, 71 | url: emojiUrls.get(emojiName), 72 | hash: currentCommitHash, 73 | date: currentCommitTime 74 | }) 75 | continue; 76 | } 77 | if (line.startsWith("M")) { 78 | const emojiName = getEmojiName(line.slice(1).trim()).replace(/\.png$/, ""); 79 | history.push({ 80 | type: "modify", 81 | emojiName, 82 | url: emojiUrls.get(emojiName), 83 | hash: currentCommitHash, 84 | date: currentCommitTime 85 | }) 86 | continue; 87 | } 88 | } 89 | return history; 90 | } 91 | 92 | const decoder = new util.TextDecoder('utf-8'); 93 | 94 | function getEmojiName(name) { 95 | // thinking_無 is encoded like "emojis/thinking_\\347\\204\\241.png", so we need to decode it 96 | if (/^".*"$/.test(name)) { 97 | name = name.slice(1, -1); 98 | const buf = new Uint8Array(name.length); 99 | const encodedRegExp = /\\(\d+)/y; 100 | let bufIndex = 0; 101 | for (let strIndex = 0; strIndex < name.length; strIndex++) { 102 | encodedRegExp.lastIndex = strIndex; 103 | const m = encodedRegExp.exec(name); 104 | if (m) { 105 | buf[bufIndex++] = parseInt(m[1], 8); 106 | strIndex += m[0].length - 1; 107 | } else { 108 | buf[bufIndex++] = name.charCodeAt(strIndex); 109 | } 110 | } 111 | name = decoder.decode(buf.subarray(0, bufIndex)); 112 | } 113 | return name 114 | } -------------------------------------------------------------------------------- /emojis/thinking_fire.svg: -------------------------------------------------------------------------------- 1 | 2 | 68 | -------------------------------------------------------------------------------- /emojis/thinking_looking_back_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 57 | 62 | 70 | 78 | 82 | 86 | 87 | -------------------------------------------------------------------------------- /emojis/slightly_smiling_angry.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 55 | 61 | 65 | 72 | 79 | 80 | 85 | 86 | -------------------------------------------------------------------------------- /emojis/three_eyes.svg: -------------------------------------------------------------------------------- 1 | 2 | 111 | -------------------------------------------------------------------------------- /emojis/thinking_pien.svg: -------------------------------------------------------------------------------- 1 | 2 | 71 | -------------------------------------------------------------------------------- /emojis/thinking_devil.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 57 | 61 | 66 | 74 | 82 | 87 | 92 | 93 | -------------------------------------------------------------------------------- /emojis/thinking_rolling_eyes.svg: -------------------------------------------------------------------------------- 1 | 2 | 83 | -------------------------------------------------------------------------------- /emojis/thinking_anxious_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 56 | 60 | 64 | 68 | 72 | 79 | 86 | 90 | 95 | 96 | -------------------------------------------------------------------------------- /emojis/dinging_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 55 | 59 | 65 | 69 | 70 | 75 | 78 | 82 | 89 | 96 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /emojis/thinking_dizzy_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 57 | 61 | 65 | 69 | 73 | 77 | 78 | -------------------------------------------------------------------------------- /emojis/dotted_thinking_face.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml 69 | -------------------------------------------------------------------------------- /emojis/thinking_melting_face.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml 69 | -------------------------------------------------------------------------------- /emojis/thinking_cloud.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 59 | 64 | 72 | 80 | 85 | 90 | 91 | -------------------------------------------------------------------------------- /emojis/picking_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 53 | 56 | 62 | 66 | 73 | 80 | 84 | 85 | 88 | 92 | 96 | 100 | 101 | 104 | 108 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /emojis/thinking_eyes.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 56 | 61 | 65 | 66 | 71 | 74 | 81 | 86 | 92 | 98 | 104 | 111 | 115 | 121 | 127 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /emojis/thinking_face_with_sunglasses.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 28 | 48 | 52 | 56 | 57 | 62 | 65 | 69 | 76 | 83 | 87 | 91 | 92 | 93 | 98 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /emojis/thinking_frog.svg: -------------------------------------------------------------------------------- 1 | 2 | 90 | -------------------------------------------------------------------------------- /emojis/thinking_computer.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 59 | 63 | 67 | 71 | 74 | 77 | 81 | 88 | 95 | 100 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /emojis/thinking_link.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 28 | 49 | 56 | 59 | 62 | 67 | 73 | 77 | 78 | 79 | 84 | 92 | 100 | 105 | 110 | 111 | -------------------------------------------------------------------------------- /emojis/oinking_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 56 | 60 | 64 | 67 | 71 | 75 | 76 | 82 | 88 | 91 | 96 | 99 | 100 | -------------------------------------------------------------------------------- /emojis/linking_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 53 | 56 | 62 | 66 | 73 | 80 | 84 | 85 | 88 | 92 | 96 | 100 | 101 | 105 | 110 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /emojis/thinking_bomb.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 58 | 62 | 65 | 70 | 77 | 84 | 91 | 92 | 93 | 94 | 99 | 102 | 107 | 115 | 123 | 127 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /emojis/thinking_money_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 57 | 61 | 65 | 69 | 73 | 77 | 78 | -------------------------------------------------------------------------------- /emojis/reading_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 53 | 56 | 62 | 66 | 73 | 80 | 84 | 85 | 88 | 93 | 99 | 105 | 110 | 114 | 118 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /emojis/thinking_bulb.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 61 | 65 | 69 | 73 | 77 | 78 | 83 | 86 | 90 | 97 | 104 | 108 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /emojis/thinking_knife.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 52 | 55 | 59 | 63 | 67 | 74 | 81 | 82 | 85 | 90 | 98 | 106 | 111 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /emojis/thinking_beer.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 56 | 60 | 64 | 69 | 73 | 77 | 78 | 83 | 86 | 90 | 97 | 104 | 108 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /emojis/ringing_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 59 | 64 | 67 | 72 | 80 | 88 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /emojis/thinking_skull.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 55 | 59 | 65 | 68 | 71 | 75 | 76 | 80 | 84 | 89 | 93 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /emojis/shrinking_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 56 | 63 | 64 | 69 | 76 | 77 | 82 | 89 | 90 | 95 | 102 | 103 | 108 | 115 | 120 | 128 | 136 | 141 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /emojis/singing_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 51 | 54 | 60 | 64 | 71 | 78 | 82 | 83 | 85 | 90 | 94 | 95 | 98 | 102 | 106 | 110 | 113 | 118 | 123 | 128 | 133 | 138 | 143 | 148 | 153 | 158 | 163 | 168 | 173 | 174 | 178 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /emojis/thinking_dead.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 30 | 32 | 53 | 58 | 64 | 68 | 69 | 74 | 77 | 81 | 88 | 95 | 99 | 102 | 106 | 111 | 112 | 113 | 114 | 115 | 120 | 125 | 130 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /emojis/writing_face.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 31 | 53 | 56 | 62 | 66 | 73 | 80 | 84 | 85 | 88 | 92 | 96 | 100 | 104 | 105 | 108 | 113 | 119 | 125 | 130 | 135 | 140 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /emojis/thinking_dead2.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | 27 | 28 | 29 | 30 | 32 | 53 | 58 | 64 | 68 | 69 | 74 | 77 | 81 | 84 | 88 | 93 | 94 | 95 | 96 | 97 | 103 | 107 | 111 | 115 | 116 | 117 | 122 | 127 | 132 | 137 | 138 | 139 | --------------------------------------------------------------------------------