1
0
Fork 0
mirror of https://github.com/emojisum/emojisum.git synced 2024-11-27 09:45:40 +00:00

Merge pull request #6 from vbatts/map_emoji_words

Map emoji words
This commit is contained in:
Vincent Batts 2017-02-07 14:38:24 -05:00 committed by GitHub
commit 57fc4649c2
9 changed files with 1141 additions and 537 deletions

13
emoji/Makefile Normal file
View file

@ -0,0 +1,13 @@
default: map_gen.go list.md
.PHONY: map_gen.go
map_gen.go: map_json.go map.go emojimap.json
rm -f $@
go run map_json.go -template map_gen -in ./emojimap.json -out ./$@
.PHONY: list.md
list.md: map_json.go map.go emojimap.json
rm -f $@
go run map_json.go -template markdown_gen -in ./emojimap.json -out ./$@

View file

@ -22,6 +22,7 @@ preserved, and that any substantive changes or deletions from the original are
clearly marked.
A pointer to the latest version of the canonical JSON is the URL: [http://emoji.thisco.de/draft/emojimap.json](http://emoji.thisco.de/draft/emojimap.json)
A pointer to the latest version of this spec the URL: [http://emoji.thisco.de/draft/](http://emoji.thisco.de/draft/)
Related documentation in can be found at the URL: [http://emoji.thisco.de/](http://emoji.thisco.de/)
## Abstract
@ -30,6 +31,7 @@ This document specifies a practice of mapping an 8bit byte to one of a
corresponding list of 256 emoji strings.
The [`emojimap.json`](./emojimap.json) JSON is the authority of ordering.
There is a generated visualiztion of this JSON document at [`list.md`](./list.md).
While this directory contains golang source that is is importable by golang
projects, other languages can fetch the ordered list of the JSON document and
do their own emojisum comparison or rendering.
@ -60,4 +62,5 @@ In example, a [SHA1](https://en.wikipedia.org/wiki/SHA-1) checksum is 40 hexadec
## References
* Unicode Technical Report #51 - http://www.unicode.org/reports/tr51/
* http://www.webpagefx.com/tools/emoji-cheat-sheet/

View file

@ -1,262 +1,262 @@
{
"version": "draft",
"description": "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji",
"version": "draft+1",
"description": "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.",
"emojiwords": [
":+1:",
":8ball:",
":airplane:",
":alien:",
":anchor:",
":angel:",
":angry:",
":ant:",
":apple:",
":art:",
":baby:",
":baby_bottle:",
":back:",
":bamboo:",
":banana:",
":barber:",
":bathtub:",
":beer:",
":bell:",
":bicyclist:",
":bird:",
":birthday:",
":blossom:",
":blue_car:",
":boar:",
":bomb:",
":boom:",
":bow:",
":boy:",
":broken_heart:",
":bulb:",
":bus:",
":cactus:",
":calendar:",
":camera:",
":candy:",
":cat:",
":cherries:",
":children_crossing:",
":chocolate_bar:",
":clap:",
":cloud:",
":clubs:",
":cn:",
":coffee:",
":construction:",
":cookie:",
":copyright:",
":corn:",
":cow:",
":crescent_moon:",
":crown:",
":cry:",
":crystal_ball:",
":curly_loop:",
":dancers:",
":dash:",
":de:",
":diamonds:",
":dog:",
":doughnut:",
":dragon:",
":dvd:",
":ear:",
":eggplant:",
":elephant:",
":end:",
":envelope:",
":es:",
":eyes:",
":facepunch:",
":family:",
":ferris_wheel:",
":finnadie:",
":fire:",
":fireworks:",
":floppy_disk:",
":football:",
":fork_and_knife:",
":four_leaf_clover:",
":fr:",
":fries:",
":frog:",
":fu:",
":full_moon:",
":game_die:",
":eu:",
":gem:",
":girl:",
":goat:",
":grimacing:",
":grin:",
":guardsman:",
":guitar:",
":gun:",
":hamburger:",
":hammer:",
":hamster:",
":hear_no_evil:",
":heart:",
":heart_eyes_cat:",
":hearts:",
":heavy_check_mark:",
":moyai:",
":izakaya_lantern:",
":helicopter:",
":hocho:",
":honeybee:",
":horse:",
":horse_racing:",
":hourglass:",
":house:",
":hurtrealbad:",
":icecream:",
":imp:",
":it:",
":jack_o_lantern:",
":japanese_goblin:",
":jp:",
":key:",
":kiss:",
":kissing_cat:",
":koala:",
":kr:",
":lemon:",
":lipstick:",
":lock:",
":lollipop:",
":man:",
":maple_leaf:",
":mask:",
":metal:",
":microscope:",
":moneybag:",
":monkey:",
":mount_fuji:",
":muscle:",
":mushroom:",
":musical_keyboard:",
":musical_score:",
":nail_care:",
":new_moon:",
":no_entry:",
":nose:",
":notes:",
":nut_and_bolt:",
":o:",
":ocean:",
":ok_hand:",
":on:",
":package:",
":palm_tree:",
":panda_face:",
":paperclip:",
":partly_sunny:",
":passport_control:",
":paw_prints:",
":peach:",
":penguin:",
":phone:",
":pig:",
":pill:",
":pineapple:",
":pizza:",
":point_left:",
":point_right:",
":poop:",
":poultry_leg:",
":pray:",
":princess:",
":purse:",
":pushpin:",
":rabbit:",
":rainbow:",
":raised_hand:",
":recycle:",
":red_car:",
":registered:",
":ribbon:",
":rice:",
":rocket:",
":roller_coaster:",
":rooster:",
":ru:",
":sailboat:",
":santa:",
":satellite:",
":satisfied:",
":saxophone:",
":scissors:",
":see_no_evil:",
":sheep:",
":shell:",
":shoe:",
":ski:",
":skull:",
":sleepy:",
":smile:",
":smiley_cat:",
":smirk:",
":smoking:",
":snail:",
":snake:",
":snowflake:",
":soccer:",
":soon:",
":space_invader:",
":spades:",
":speak_no_evil:",
":star:",
":stars:",
":statue_of_liberty:",
":steam_locomotive:",
":sunflower:",
":sunglasses:",
":sunny:",
":sunrise:",
":surfer:",
":swimmer:",
":syringe:",
":tada:",
":tangerine:",
":taxi:",
":tennis:",
":tent:",
":thought_balloon:",
":tm:",
":toilet:",
":tongue:",
":tophat:",
":tractor:",
":trolleybus:",
":trollface:",
":trophy:",
":trumpet:",
":turtle:",
":two_men_holding_hands:",
":two_women_holding_hands:",
":uk:",
":umbrella:",
":unlock:",
":us:",
":v:",
":vhs:",
":violin:",
":warning:",
":watermelon:",
":wave:",
":wavy_dash:",
":wc:",
":wheelchair:",
":woman:",
":x:",
":yum:",
":zap:",
":zzz:"
[":+1:"],
[":8ball:"],
[":airplane:"],
[":alien:"],
[":anchor:"],
[":angel:"],
[":angry:"],
[":ant:"],
[":apple:"],
[":art:"],
[":baby:"],
[":baby_bottle:"],
[":back:"],
[":bamboo:"],
[":banana:"],
[":barber:"],
[":bathtub:"],
[":beer:"],
[":bell:"],
[":bicyclist:"],
[":bird:"],
[":birthday:"],
[":blossom:"],
[":blue_car:"],
[":boar:"],
[":bomb:"],
[":boom:"],
[":bow:"],
[":boy:"],
[":broken_heart:"],
[":bulb:"],
[":bus:"],
[":cactus:"],
[":calendar:"],
[":camera:"],
[":candy:"],
[":cat:"],
[":cherries:"],
[":children_crossing:"],
[":chocolate_bar:"],
[":clap:"],
[":cloud:"],
[":clubs:"],
[":cn:"],
[":coffee:"],
[":construction:"],
[":cookie:"],
[":copyright:"],
[":corn:"],
[":cow:"],
[":crescent_moon:"],
[":crown:"],
[":cry:"],
[":crystal_ball:"],
[":curly_loop:"],
[":dancers:"],
[":dash:"],
[":de:"],
[":diamonds:"],
[":dog:"],
[":doughnut:"],
[":dragon:"],
[":dvd:"],
[":ear:"],
[":eggplant:"],
[":elephant:"],
[":end:"],
[":envelope:"],
[":es:"],
[":eyes:"],
[":facepunch:"],
[":family:"],
[":ferris_wheel:"],
[":finnadie:"],
[":fire:"],
[":fireworks:"],
[":floppy_disk:"],
[":football:"],
[":fork_and_knife:"],
[":four_leaf_clover:"],
[":fr:"],
[":fries:"],
[":frog:"],
[":fu:"],
[":full_moon:"],
[":game_die:"],
[":eu:"],
[":gem:"],
[":girl:"],
[":goat:"],
[":grimacing:"],
[":grin:"],
[":guardsman:"],
[":guitar:"],
[":gun:"],
[":hamburger:"],
[":hammer:"],
[":hamster:"],
[":hear_no_evil:"],
[":heart:"],
[":heart_eyes_cat:"],
[":hearts:"],
[":heavy_check_mark:"],
[":moyai:"],
[":izakaya_lantern:"],
[":helicopter:"],
[":hocho:"],
[":honeybee:"],
[":horse:"],
[":horse_racing:"],
[":hourglass:"],
[":house:"],
[":hurtrealbad:"],
[":icecream:"],
[":imp:"],
[":it:"],
[":jack_o_lantern:"],
[":japanese_goblin:"],
[":jp:"],
[":key:"],
[":kiss:"],
[":kissing_cat:"],
[":koala:"],
[":kr:"],
[":lemon:"],
[":lipstick:"],
[":lock:"],
[":lollipop:"],
[":man:"],
[":maple_leaf:"],
[":mask:"],
[":metal:", "U+1F918"],
[":microscope:"],
[":moneybag:"],
[":monkey:"],
[":mount_fuji:"],
[":muscle:"],
[":mushroom:"],
[":musical_keyboard:"],
[":musical_score:"],
[":nail_care:"],
[":new_moon:"],
[":no_entry:"],
[":nose:"],
[":notes:"],
[":nut_and_bolt:"],
[":o:"],
[":ocean:"],
[":ok_hand:"],
[":on:"],
[":package:"],
[":palm_tree:"],
[":panda_face:"],
[":paperclip:"],
[":partly_sunny:"],
[":passport_control:"],
[":paw_prints:"],
[":peach:"],
[":penguin:"],
[":phone:"],
[":pig:"],
[":pill:"],
[":pineapple:"],
[":pizza:"],
[":point_left:"],
[":point_right:"],
[":poop:"],
[":poultry_leg:"],
[":pray:"],
[":princess:"],
[":purse:"],
[":pushpin:"],
[":rabbit:"],
[":rainbow:"],
[":raised_hand:"],
[":recycle:"],
[":red_car:"],
[":registered:"],
[":ribbon:"],
[":rice:"],
[":rocket:"],
[":roller_coaster:"],
[":rooster:"],
[":ru:"],
[":sailboat:"],
[":santa:"],
[":satellite:"],
[":satisfied:"],
[":saxophone:"],
[":scissors:"],
[":see_no_evil:"],
[":sheep:"],
[":shell:"],
[":shoe:"],
[":ski:"],
[":skull:"],
[":sleepy:"],
[":smile:"],
[":smiley_cat:"],
[":smirk:"],
[":smoking:"],
[":snail:"],
[":snake:"],
[":snowflake:"],
[":soccer:"],
[":soon:"],
[":space_invader:"],
[":spades:"],
[":speak_no_evil:"],
[":star:"],
[":stars:"],
[":statue_of_liberty:"],
[":steam_locomotive:"],
[":sunflower:"],
[":sunglasses:"],
[":sunny:"],
[":sunrise:"],
[":surfer:"],
[":swimmer:"],
[":syringe:"],
[":tada:"],
[":tangerine:"],
[":taxi:"],
[":tennis:"],
[":tent:"],
[":thought_balloon:"],
[":tm:"],
[":toilet:"],
[":tongue:"],
[":tophat:"],
[":tractor:"],
[":trolleybus:"],
[":trollface:"],
[":trophy:"],
[":trumpet:"],
[":turtle:"],
[":two_men_holding_hands:"],
[":two_women_holding_hands:"],
[":uk:"],
[":umbrella:"],
[":unlock:"],
[":us:"],
[":v:"],
[":vhs:"],
[":violin:"],
[":warning:"],
[":watermelon:"],
[":wave:"],
[":wavy_dash:"],
[":wc:"],
[":wheelchair:"],
[":woman:"],
[":x:"],
[":yum:"],
[":zap:"],
[":zzz:"]
]
}

273
emoji/list.md Normal file
View file

@ -0,0 +1,273 @@
## Emoji Map list
_THIS FILE IS GENERATED. DO NOT EDIT._
This is for "pretty" viewing purposes.
To view the functional document, see [emojimap.json](./emojimap.json).
### Description
This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.
### Version
draft+1
### List
* `0` -- :+1: `:+1:`
* `1` -- :8ball: `:8ball:`
* `2` -- :airplane: `:airplane:`
* `3` -- :alien: `:alien:`
* `4` -- :anchor: `:anchor:`
* `5` -- :angel: `:angel:`
* `6` -- :angry: `:angry:`
* `7` -- :ant: `:ant:`
* `8` -- :apple: `:apple:`
* `9` -- :art: `:art:`
* `10` -- :baby: `:baby:`
* `11` -- :baby_bottle: `:baby_bottle:`
* `12` -- :back: `:back:`
* `13` -- :bamboo: `:bamboo:`
* `14` -- :banana: `:banana:`
* `15` -- :barber: `:barber:`
* `16` -- :bathtub: `:bathtub:`
* `17` -- :beer: `:beer:`
* `18` -- :bell: `:bell:`
* `19` -- :bicyclist: `:bicyclist:`
* `20` -- :bird: `:bird:`
* `21` -- :birthday: `:birthday:`
* `22` -- :blossom: `:blossom:`
* `23` -- :blue_car: `:blue_car:`
* `24` -- :boar: `:boar:`
* `25` -- :bomb: `:bomb:`
* `26` -- :boom: `:boom:`
* `27` -- :bow: `:bow:`
* `28` -- :boy: `:boy:`
* `29` -- :broken_heart: `:broken_heart:`
* `30` -- :bulb: `:bulb:`
* `31` -- :bus: `:bus:`
* `32` -- :cactus: `:cactus:`
* `33` -- :calendar: `:calendar:`
* `34` -- :camera: `:camera:`
* `35` -- :candy: `:candy:`
* `36` -- :cat: `:cat:`
* `37` -- :cherries: `:cherries:`
* `38` -- :children_crossing: `:children_crossing:`
* `39` -- :chocolate_bar: `:chocolate_bar:`
* `40` -- :clap: `:clap:`
* `41` -- :cloud: `:cloud:`
* `42` -- :clubs: `:clubs:`
* `43` -- :cn: `:cn:`
* `44` -- :coffee: `:coffee:`
* `45` -- :construction: `:construction:`
* `46` -- :cookie: `:cookie:`
* `47` -- :copyright: `:copyright:`
* `48` -- :corn: `:corn:`
* `49` -- :cow: `:cow:`
* `50` -- :crescent_moon: `:crescent_moon:`
* `51` -- :crown: `:crown:`
* `52` -- :cry: `:cry:`
* `53` -- :crystal_ball: `:crystal_ball:`
* `54` -- :curly_loop: `:curly_loop:`
* `55` -- :dancers: `:dancers:`
* `56` -- :dash: `:dash:`
* `57` -- :de: `:de:`
* `58` -- :diamonds: `:diamonds:`
* `59` -- :dog: `:dog:`
* `60` -- :doughnut: `:doughnut:`
* `61` -- :dragon: `:dragon:`
* `62` -- :dvd: `:dvd:`
* `63` -- :ear: `:ear:`
* `64` -- :eggplant: `:eggplant:`
* `65` -- :elephant: `:elephant:`
* `66` -- :end: `:end:`
* `67` -- :envelope: `:envelope:`
* `68` -- :es: `:es:`
* `69` -- :eyes: `:eyes:`
* `70` -- :facepunch: `:facepunch:`
* `71` -- :family: `:family:`
* `72` -- :ferris_wheel: `:ferris_wheel:`
* `73` -- :finnadie: `:finnadie:`
* `74` -- :fire: `:fire:`
* `75` -- :fireworks: `:fireworks:`
* `76` -- :floppy_disk: `:floppy_disk:`
* `77` -- :football: `:football:`
* `78` -- :fork_and_knife: `:fork_and_knife:`
* `79` -- :four_leaf_clover: `:four_leaf_clover:`
* `80` -- :fr: `:fr:`
* `81` -- :fries: `:fries:`
* `82` -- :frog: `:frog:`
* `83` -- :fu: `:fu:`
* `84` -- :full_moon: `:full_moon:`
* `85` -- :game_die: `:game_die:`
* `86` -- :eu: `:eu:`
* `87` -- :gem: `:gem:`
* `88` -- :girl: `:girl:`
* `89` -- :goat: `:goat:`
* `90` -- :grimacing: `:grimacing:`
* `91` -- :grin: `:grin:`
* `92` -- :guardsman: `:guardsman:`
* `93` -- :guitar: `:guitar:`
* `94` -- :gun: `:gun:`
* `95` -- :hamburger: `:hamburger:`
* `96` -- :hammer: `:hammer:`
* `97` -- :hamster: `:hamster:`
* `98` -- :hear_no_evil: `:hear_no_evil:`
* `99` -- :heart: `:heart:`
* `100` -- :heart_eyes_cat: `:heart_eyes_cat:`
* `101` -- :hearts: `:hearts:`
* `102` -- :heavy_check_mark: `:heavy_check_mark:`
* `103` -- :moyai: `:moyai:`
* `104` -- :izakaya_lantern: `:izakaya_lantern:`
* `105` -- :helicopter: `:helicopter:`
* `106` -- :hocho: `:hocho:`
* `107` -- :honeybee: `:honeybee:`
* `108` -- :horse: `:horse:`
* `109` -- :horse_racing: `:horse_racing:`
* `110` -- :hourglass: `:hourglass:`
* `111` -- :house: `:house:`
* `112` -- :hurtrealbad: `:hurtrealbad:`
* `113` -- :icecream: `:icecream:`
* `114` -- :imp: `:imp:`
* `115` -- :it: `:it:`
* `116` -- :jack_o_lantern: `:jack_o_lantern:`
* `117` -- :japanese_goblin: `:japanese_goblin:`
* `118` -- :jp: `:jp:`
* `119` -- :key: `:key:`
* `120` -- :kiss: `:kiss:`
* `121` -- :kissing_cat: `:kissing_cat:`
* `122` -- :koala: `:koala:`
* `123` -- :kr: `:kr:`
* `124` -- :lemon: `:lemon:`
* `125` -- :lipstick: `:lipstick:`
* `126` -- :lock: `:lock:`
* `127` -- :lollipop: `:lollipop:`
* `128` -- :man: `:man:`
* `129` -- :maple_leaf: `:maple_leaf:`
* `130` -- :mask: `:mask:`
* `131` -- :metal: `:metal:` U+1F918
* `132` -- :microscope: `:microscope:`
* `133` -- :moneybag: `:moneybag:`
* `134` -- :monkey: `:monkey:`
* `135` -- :mount_fuji: `:mount_fuji:`
* `136` -- :muscle: `:muscle:`
* `137` -- :mushroom: `:mushroom:`
* `138` -- :musical_keyboard: `:musical_keyboard:`
* `139` -- :musical_score: `:musical_score:`
* `140` -- :nail_care: `:nail_care:`
* `141` -- :new_moon: `:new_moon:`
* `142` -- :no_entry: `:no_entry:`
* `143` -- :nose: `:nose:`
* `144` -- :notes: `:notes:`
* `145` -- :nut_and_bolt: `:nut_and_bolt:`
* `146` -- :o: `:o:`
* `147` -- :ocean: `:ocean:`
* `148` -- :ok_hand: `:ok_hand:`
* `149` -- :on: `:on:`
* `150` -- :package: `:package:`
* `151` -- :palm_tree: `:palm_tree:`
* `152` -- :panda_face: `:panda_face:`
* `153` -- :paperclip: `:paperclip:`
* `154` -- :partly_sunny: `:partly_sunny:`
* `155` -- :passport_control: `:passport_control:`
* `156` -- :paw_prints: `:paw_prints:`
* `157` -- :peach: `:peach:`
* `158` -- :penguin: `:penguin:`
* `159` -- :phone: `:phone:`
* `160` -- :pig: `:pig:`
* `161` -- :pill: `:pill:`
* `162` -- :pineapple: `:pineapple:`
* `163` -- :pizza: `:pizza:`
* `164` -- :point_left: `:point_left:`
* `165` -- :point_right: `:point_right:`
* `166` -- :poop: `:poop:`
* `167` -- :poultry_leg: `:poultry_leg:`
* `168` -- :pray: `:pray:`
* `169` -- :princess: `:princess:`
* `170` -- :purse: `:purse:`
* `171` -- :pushpin: `:pushpin:`
* `172` -- :rabbit: `:rabbit:`
* `173` -- :rainbow: `:rainbow:`
* `174` -- :raised_hand: `:raised_hand:`
* `175` -- :recycle: `:recycle:`
* `176` -- :red_car: `:red_car:`
* `177` -- :registered: `:registered:`
* `178` -- :ribbon: `:ribbon:`
* `179` -- :rice: `:rice:`
* `180` -- :rocket: `:rocket:`
* `181` -- :roller_coaster: `:roller_coaster:`
* `182` -- :rooster: `:rooster:`
* `183` -- :ru: `:ru:`
* `184` -- :sailboat: `:sailboat:`
* `185` -- :santa: `:santa:`
* `186` -- :satellite: `:satellite:`
* `187` -- :satisfied: `:satisfied:`
* `188` -- :saxophone: `:saxophone:`
* `189` -- :scissors: `:scissors:`
* `190` -- :see_no_evil: `:see_no_evil:`
* `191` -- :sheep: `:sheep:`
* `192` -- :shell: `:shell:`
* `193` -- :shoe: `:shoe:`
* `194` -- :ski: `:ski:`
* `195` -- :skull: `:skull:`
* `196` -- :sleepy: `:sleepy:`
* `197` -- :smile: `:smile:`
* `198` -- :smiley_cat: `:smiley_cat:`
* `199` -- :smirk: `:smirk:`
* `200` -- :smoking: `:smoking:`
* `201` -- :snail: `:snail:`
* `202` -- :snake: `:snake:`
* `203` -- :snowflake: `:snowflake:`
* `204` -- :soccer: `:soccer:`
* `205` -- :soon: `:soon:`
* `206` -- :space_invader: `:space_invader:`
* `207` -- :spades: `:spades:`
* `208` -- :speak_no_evil: `:speak_no_evil:`
* `209` -- :star: `:star:`
* `210` -- :stars: `:stars:`
* `211` -- :statue_of_liberty: `:statue_of_liberty:`
* `212` -- :steam_locomotive: `:steam_locomotive:`
* `213` -- :sunflower: `:sunflower:`
* `214` -- :sunglasses: `:sunglasses:`
* `215` -- :sunny: `:sunny:`
* `216` -- :sunrise: `:sunrise:`
* `217` -- :surfer: `:surfer:`
* `218` -- :swimmer: `:swimmer:`
* `219` -- :syringe: `:syringe:`
* `220` -- :tada: `:tada:`
* `221` -- :tangerine: `:tangerine:`
* `222` -- :taxi: `:taxi:`
* `223` -- :tennis: `:tennis:`
* `224` -- :tent: `:tent:`
* `225` -- :thought_balloon: `:thought_balloon:`
* `226` -- :tm: `:tm:`
* `227` -- :toilet: `:toilet:`
* `228` -- :tongue: `:tongue:`
* `229` -- :tophat: `:tophat:`
* `230` -- :tractor: `:tractor:`
* `231` -- :trolleybus: `:trolleybus:`
* `232` -- :trollface: `:trollface:`
* `233` -- :trophy: `:trophy:`
* `234` -- :trumpet: `:trumpet:`
* `235` -- :turtle: `:turtle:`
* `236` -- :two_men_holding_hands: `:two_men_holding_hands:`
* `237` -- :two_women_holding_hands: `:two_women_holding_hands:`
* `238` -- :uk: `:uk:`
* `239` -- :umbrella: `:umbrella:`
* `240` -- :unlock: `:unlock:`
* `241` -- :us: `:us:`
* `242` -- :v: `:v:`
* `243` -- :vhs: `:vhs:`
* `244` -- :violin: `:violin:`
* `245` -- :warning: `:warning:`
* `246` -- :watermelon: `:watermelon:`
* `247` -- :wave: `:wave:`
* `248` -- :wavy_dash: `:wavy_dash:`
* `249` -- :wc: `:wc:`
* `250` -- :wheelchair: `:wheelchair:`
* `251` -- :woman: `:woman:`
* `252` -- :x: `:x:`
* `253` -- :yum: `:yum:`
* `254` -- :zap: `:zap:`
* `255` -- :zzz: `:zzz:`

View file

@ -1,10 +1,10 @@
//go:generate go run map_json.go -in ./emojimap.json -out ./map_gen.go
package emoji
import "strings"
// Map returns the emoji at the provided position.
// This list is from 0-255
func Map(b byte) string {
func Map(b byte) Words {
return mapGen.EmojiWords[int(b)]
}
@ -21,5 +21,19 @@ type VersionedMap struct {
Description string `json:"description"`
Version string `json:"version"`
// these are an ordered list, referened by a byte (each byte of a checksum digest)
EmojiWords []string `json:"emojiwords"`
EmojiWords []Words `json:"emojiwords"`
}
// Words are a set of options to represent an emoji.
// Possible options could be the ":colon_notation:" or a "U+26CF" style codepoint.
type Words []string
// IsColonNotation checks for whether a word is the :colon_notation: of emoji
func IsColonNotation(word string) bool {
return strings.HasPrefix(word, ":") && strings.HasSuffix(word, ":")
}
// IsCodepoint checks for whether a word is the "U+1234" codepoint style of emoji
func IsCodepoint(word string) bool {
return strings.HasPrefix(strings.ToUpper(word), "U+")
}

View file

@ -1,268 +1,525 @@
// THIS FILE IS GENERATED. DO NOT EDIT.
package emoji
func init() {
mapGen = VersionedMap{
Description: "",
Version: "draft",
EmojiWords: []string{
":+1:",
":8ball:",
":airplane:",
":alien:",
":anchor:",
":angel:",
":angry:",
":ant:",
":apple:",
":art:",
":baby:",
":baby_bottle:",
":back:",
":bamboo:",
":banana:",
":barber:",
":bathtub:",
":beer:",
":bell:",
":bicyclist:",
":bird:",
":birthday:",
":blossom:",
":blue_car:",
":boar:",
":bomb:",
":boom:",
":bow:",
":boy:",
":broken_heart:",
":bulb:",
":bus:",
":cactus:",
":calendar:",
":camera:",
":candy:",
":cat:",
":cherries:",
":children_crossing:",
":chocolate_bar:",
":clap:",
":cloud:",
":clubs:",
":cn:",
":coffee:",
":construction:",
":cookie:",
":copyright:",
":corn:",
":cow:",
":crescent_moon:",
":crown:",
":cry:",
":crystal_ball:",
":curly_loop:",
":dancers:",
":dash:",
":de:",
":diamonds:",
":dog:",
":doughnut:",
":dragon:",
":dvd:",
":ear:",
":eggplant:",
":elephant:",
":end:",
":envelope:",
":es:",
":eyes:",
":facepunch:",
":family:",
":ferris_wheel:",
":finnadie:",
":fire:",
":fireworks:",
":floppy_disk:",
":football:",
":fork_and_knife:",
":four_leaf_clover:",
":fr:",
":fries:",
":frog:",
":fu:",
":full_moon:",
":game_die:",
":eu:",
":gem:",
":girl:",
":goat:",
":grimacing:",
":grin:",
":guardsman:",
":guitar:",
":gun:",
":hamburger:",
":hammer:",
":hamster:",
":hear_no_evil:",
":heart:",
":heart_eyes_cat:",
":hearts:",
":heavy_check_mark:",
":moyai:",
":izakaya_lantern:",
":helicopter:",
":hocho:",
":honeybee:",
":horse:",
":horse_racing:",
":hourglass:",
":house:",
":hurtrealbad:",
":icecream:",
":imp:",
":it:",
":jack_o_lantern:",
":japanese_goblin:",
":jp:",
":key:",
":kiss:",
":kissing_cat:",
":koala:",
":kr:",
":lemon:",
":lipstick:",
":lock:",
":lollipop:",
":man:",
":maple_leaf:",
":mask:",
":metal:",
":microscope:",
":moneybag:",
":monkey:",
":mount_fuji:",
":muscle:",
":mushroom:",
":musical_keyboard:",
":musical_score:",
":nail_care:",
":new_moon:",
":no_entry:",
":nose:",
":notes:",
":nut_and_bolt:",
":o:",
":ocean:",
":ok_hand:",
":on:",
":package:",
":palm_tree:",
":panda_face:",
":paperclip:",
":partly_sunny:",
":passport_control:",
":paw_prints:",
":peach:",
":penguin:",
":phone:",
":pig:",
":pill:",
":pineapple:",
":pizza:",
":point_left:",
":point_right:",
":poop:",
":poultry_leg:",
":pray:",
":princess:",
":purse:",
":pushpin:",
":rabbit:",
":rainbow:",
":raised_hand:",
":recycle:",
":red_car:",
":registered:",
":ribbon:",
":rice:",
":rocket:",
":roller_coaster:",
":rooster:",
":ru:",
":sailboat:",
":santa:",
":satellite:",
":satisfied:",
":saxophone:",
":scissors:",
":see_no_evil:",
":sheep:",
":shell:",
":shoe:",
":ski:",
":skull:",
":sleepy:",
":smile:",
":smiley_cat:",
":smirk:",
":smoking:",
":snail:",
":snake:",
":snowflake:",
":soccer:",
":soon:",
":space_invader:",
":spades:",
":speak_no_evil:",
":star:",
":stars:",
":statue_of_liberty:",
":steam_locomotive:",
":sunflower:",
":sunglasses:",
":sunny:",
":sunrise:",
":surfer:",
":swimmer:",
":syringe:",
":tada:",
":tangerine:",
":taxi:",
":tennis:",
":tent:",
":thought_balloon:",
":tm:",
":toilet:",
":tongue:",
":tophat:",
":tractor:",
":trolleybus:",
":trollface:",
":trophy:",
":trumpet:",
":turtle:",
":two_men_holding_hands:",
":two_women_holding_hands:",
":uk:",
":umbrella:",
":unlock:",
":us:",
":v:",
":vhs:",
":violin:",
":warning:",
":watermelon:",
":wave:",
":wavy_dash:",
":wc:",
":wheelchair:",
":woman:",
":x:",
":yum:",
":zap:",
":zzz:",
Description: "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.",
Version: "draft+1",
EmojiWords: []Words{
Words{ ":+1:",
},
Words{ ":8ball:",
},
Words{ ":airplane:",
},
Words{ ":alien:",
},
Words{ ":anchor:",
},
Words{ ":angel:",
},
Words{ ":angry:",
},
Words{ ":ant:",
},
Words{ ":apple:",
},
Words{ ":art:",
},
Words{ ":baby:",
},
Words{ ":baby_bottle:",
},
Words{ ":back:",
},
Words{ ":bamboo:",
},
Words{ ":banana:",
},
Words{ ":barber:",
},
Words{ ":bathtub:",
},
Words{ ":beer:",
},
Words{ ":bell:",
},
Words{ ":bicyclist:",
},
Words{ ":bird:",
},
Words{ ":birthday:",
},
Words{ ":blossom:",
},
Words{ ":blue_car:",
},
Words{ ":boar:",
},
Words{ ":bomb:",
},
Words{ ":boom:",
},
Words{ ":bow:",
},
Words{ ":boy:",
},
Words{ ":broken_heart:",
},
Words{ ":bulb:",
},
Words{ ":bus:",
},
Words{ ":cactus:",
},
Words{ ":calendar:",
},
Words{ ":camera:",
},
Words{ ":candy:",
},
Words{ ":cat:",
},
Words{ ":cherries:",
},
Words{ ":children_crossing:",
},
Words{ ":chocolate_bar:",
},
Words{ ":clap:",
},
Words{ ":cloud:",
},
Words{ ":clubs:",
},
Words{ ":cn:",
},
Words{ ":coffee:",
},
Words{ ":construction:",
},
Words{ ":cookie:",
},
Words{ ":copyright:",
},
Words{ ":corn:",
},
Words{ ":cow:",
},
Words{ ":crescent_moon:",
},
Words{ ":crown:",
},
Words{ ":cry:",
},
Words{ ":crystal_ball:",
},
Words{ ":curly_loop:",
},
Words{ ":dancers:",
},
Words{ ":dash:",
},
Words{ ":de:",
},
Words{ ":diamonds:",
},
Words{ ":dog:",
},
Words{ ":doughnut:",
},
Words{ ":dragon:",
},
Words{ ":dvd:",
},
Words{ ":ear:",
},
Words{ ":eggplant:",
},
Words{ ":elephant:",
},
Words{ ":end:",
},
Words{ ":envelope:",
},
Words{ ":es:",
},
Words{ ":eyes:",
},
Words{ ":facepunch:",
},
Words{ ":family:",
},
Words{ ":ferris_wheel:",
},
Words{ ":finnadie:",
},
Words{ ":fire:",
},
Words{ ":fireworks:",
},
Words{ ":floppy_disk:",
},
Words{ ":football:",
},
Words{ ":fork_and_knife:",
},
Words{ ":four_leaf_clover:",
},
Words{ ":fr:",
},
Words{ ":fries:",
},
Words{ ":frog:",
},
Words{ ":fu:",
},
Words{ ":full_moon:",
},
Words{ ":game_die:",
},
Words{ ":eu:",
},
Words{ ":gem:",
},
Words{ ":girl:",
},
Words{ ":goat:",
},
Words{ ":grimacing:",
},
Words{ ":grin:",
},
Words{ ":guardsman:",
},
Words{ ":guitar:",
},
Words{ ":gun:",
},
Words{ ":hamburger:",
},
Words{ ":hammer:",
},
Words{ ":hamster:",
},
Words{ ":hear_no_evil:",
},
Words{ ":heart:",
},
Words{ ":heart_eyes_cat:",
},
Words{ ":hearts:",
},
Words{ ":heavy_check_mark:",
},
Words{ ":moyai:",
},
Words{ ":izakaya_lantern:",
},
Words{ ":helicopter:",
},
Words{ ":hocho:",
},
Words{ ":honeybee:",
},
Words{ ":horse:",
},
Words{ ":horse_racing:",
},
Words{ ":hourglass:",
},
Words{ ":house:",
},
Words{ ":hurtrealbad:",
},
Words{ ":icecream:",
},
Words{ ":imp:",
},
Words{ ":it:",
},
Words{ ":jack_o_lantern:",
},
Words{ ":japanese_goblin:",
},
Words{ ":jp:",
},
Words{ ":key:",
},
Words{ ":kiss:",
},
Words{ ":kissing_cat:",
},
Words{ ":koala:",
},
Words{ ":kr:",
},
Words{ ":lemon:",
},
Words{ ":lipstick:",
},
Words{ ":lock:",
},
Words{ ":lollipop:",
},
Words{ ":man:",
},
Words{ ":maple_leaf:",
},
Words{ ":mask:",
},
Words{ ":metal:","U+1F918",
},
Words{ ":microscope:",
},
Words{ ":moneybag:",
},
Words{ ":monkey:",
},
Words{ ":mount_fuji:",
},
Words{ ":muscle:",
},
Words{ ":mushroom:",
},
Words{ ":musical_keyboard:",
},
Words{ ":musical_score:",
},
Words{ ":nail_care:",
},
Words{ ":new_moon:",
},
Words{ ":no_entry:",
},
Words{ ":nose:",
},
Words{ ":notes:",
},
Words{ ":nut_and_bolt:",
},
Words{ ":o:",
},
Words{ ":ocean:",
},
Words{ ":ok_hand:",
},
Words{ ":on:",
},
Words{ ":package:",
},
Words{ ":palm_tree:",
},
Words{ ":panda_face:",
},
Words{ ":paperclip:",
},
Words{ ":partly_sunny:",
},
Words{ ":passport_control:",
},
Words{ ":paw_prints:",
},
Words{ ":peach:",
},
Words{ ":penguin:",
},
Words{ ":phone:",
},
Words{ ":pig:",
},
Words{ ":pill:",
},
Words{ ":pineapple:",
},
Words{ ":pizza:",
},
Words{ ":point_left:",
},
Words{ ":point_right:",
},
Words{ ":poop:",
},
Words{ ":poultry_leg:",
},
Words{ ":pray:",
},
Words{ ":princess:",
},
Words{ ":purse:",
},
Words{ ":pushpin:",
},
Words{ ":rabbit:",
},
Words{ ":rainbow:",
},
Words{ ":raised_hand:",
},
Words{ ":recycle:",
},
Words{ ":red_car:",
},
Words{ ":registered:",
},
Words{ ":ribbon:",
},
Words{ ":rice:",
},
Words{ ":rocket:",
},
Words{ ":roller_coaster:",
},
Words{ ":rooster:",
},
Words{ ":ru:",
},
Words{ ":sailboat:",
},
Words{ ":santa:",
},
Words{ ":satellite:",
},
Words{ ":satisfied:",
},
Words{ ":saxophone:",
},
Words{ ":scissors:",
},
Words{ ":see_no_evil:",
},
Words{ ":sheep:",
},
Words{ ":shell:",
},
Words{ ":shoe:",
},
Words{ ":ski:",
},
Words{ ":skull:",
},
Words{ ":sleepy:",
},
Words{ ":smile:",
},
Words{ ":smiley_cat:",
},
Words{ ":smirk:",
},
Words{ ":smoking:",
},
Words{ ":snail:",
},
Words{ ":snake:",
},
Words{ ":snowflake:",
},
Words{ ":soccer:",
},
Words{ ":soon:",
},
Words{ ":space_invader:",
},
Words{ ":spades:",
},
Words{ ":speak_no_evil:",
},
Words{ ":star:",
},
Words{ ":stars:",
},
Words{ ":statue_of_liberty:",
},
Words{ ":steam_locomotive:",
},
Words{ ":sunflower:",
},
Words{ ":sunglasses:",
},
Words{ ":sunny:",
},
Words{ ":sunrise:",
},
Words{ ":surfer:",
},
Words{ ":swimmer:",
},
Words{ ":syringe:",
},
Words{ ":tada:",
},
Words{ ":tangerine:",
},
Words{ ":taxi:",
},
Words{ ":tennis:",
},
Words{ ":tent:",
},
Words{ ":thought_balloon:",
},
Words{ ":tm:",
},
Words{ ":toilet:",
},
Words{ ":tongue:",
},
Words{ ":tophat:",
},
Words{ ":tractor:",
},
Words{ ":trolleybus:",
},
Words{ ":trollface:",
},
Words{ ":trophy:",
},
Words{ ":trumpet:",
},
Words{ ":turtle:",
},
Words{ ":two_men_holding_hands:",
},
Words{ ":two_women_holding_hands:",
},
Words{ ":uk:",
},
Words{ ":umbrella:",
},
Words{ ":unlock:",
},
Words{ ":us:",
},
Words{ ":v:",
},
Words{ ":vhs:",
},
Words{ ":violin:",
},
Words{ ":warning:",
},
Words{ ":watermelon:",
},
Words{ ":wave:",
},
Words{ ":wavy_dash:",
},
Words{ ":wc:",
},
Words{ ":wheelchair:",
},
Words{ ":woman:",
},
Words{ ":x:",
},
Words{ ":yum:",
},
Words{ ":zap:",
},
Words{ ":zzz:",
},
},
}
}

View file

@ -1,13 +0,0 @@
// THIS FILE IS GENERATED. DO NOT EDIT.
package emoji
func init() {
mapGen = VersionedMap{
Description: "{{.Description}}",
Version: "{{.Version}}",
EmojiWords: []string{ {{- range .EmojiWords }}
"{{.}}",{{- end }}
},
}
}

View file

@ -33,7 +33,16 @@ func main() {
}
defer output.Close()
mapGoTemp := template.Must(template.ParseFiles(*flTemplate))
//mapGoTemp := template.Must(template.ParseFiles(*flTemplate))
funcMap := template.FuncMap{
"IsColonNotation": emoji.IsColonNotation,
"IsCodepoint": emoji.IsCodepoint,
}
mapGoTemp, err := template.New("").Funcs(funcMap).Parse(tmpl[*flTemplate])
if err != nil {
log.Fatal(err)
}
if err := mapGoTemp.Execute(output, vm); err != nil {
log.Fatal(err)
}
@ -42,5 +51,47 @@ func main() {
var (
flInput = flag.String("in", "emojimap.json", "json input")
flOutput = flag.String("out", "map_gen.go", "golang output")
flTemplate = flag.String("template", "map_gen.tmpl", "template of golang source to use")
flTemplate = flag.String("template", "map_gen", "template to use (map_gen or markdown_gen)")
)
var tmpl = map[string]string{
"map_gen": `
// THIS FILE IS GENERATED. DO NOT EDIT.
package emoji
func init() {
mapGen = VersionedMap{
Description: "{{.Description}}",
Version: "{{.Version}}",
EmojiWords: []Words{ {{- range .EmojiWords }}
Words{ {{ range . -}}
"{{- . }}",{{- end }}
},{{- end }}
},
}
}
`,
"markdown_gen": `
## Emoji Map list
_THIS FILE IS GENERATED. DO NOT EDIT._
This is for "pretty" viewing purposes.
To view the functional document, see [emojimap.json](./emojimap.json).
### Description
{{ .Description }}
### Version
{{ .Version }}
### List
{{- range $index, $words := .EmojiWords }}
* ` + "`{{ $index }}`" + ` -- {{ range $words }} {{- if IsColonNotation . -}} {{ . }} ` + "`{{ . }}`" + ` {{- else }} {{.}} {{- end }}{{- end }}
{{- end }}
`,
}

View file

@ -174,7 +174,13 @@ func Sum(r io.Reader) ([]byte, error) {
func emojiFromBytes(buf []byte) string {
var ret string
for _, b := range buf {
ret = ret + esum.Map(b)
for _, e := range esum.Map(b) {
// use the first colon notation word and continue
if esum.IsColonNotation(e) {
ret = ret + e
break
}
}
}
return ret
}