1
0
Fork 0
mirror of https://github.com/emojisum/emojisum.git synced 2024-11-27 17:55:39 +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. 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 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/) Related documentation in can be found at the URL: [http://emoji.thisco.de/](http://emoji.thisco.de/)
## Abstract ## 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. corresponding list of 256 emoji strings.
The [`emojimap.json`](./emojimap.json) JSON is the authority of ordering. 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 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 projects, other languages can fetch the ordered list of the JSON document and
do their own emojisum comparison or rendering. 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 ## References
* Unicode Technical Report #51 - http://www.unicode.org/reports/tr51/
* http://www.webpagefx.com/tools/emoji-cheat-sheet/ * http://www.webpagefx.com/tools/emoji-cheat-sheet/

View file

@ -1,262 +1,262 @@
{ {
"version": "draft", "version": "draft+1",
"description": "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji", "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": [ "emojiwords": [
":+1:", [":+1:"],
":8ball:", [":8ball:"],
":airplane:", [":airplane:"],
":alien:", [":alien:"],
":anchor:", [":anchor:"],
":angel:", [":angel:"],
":angry:", [":angry:"],
":ant:", [":ant:"],
":apple:", [":apple:"],
":art:", [":art:"],
":baby:", [":baby:"],
":baby_bottle:", [":baby_bottle:"],
":back:", [":back:"],
":bamboo:", [":bamboo:"],
":banana:", [":banana:"],
":barber:", [":barber:"],
":bathtub:", [":bathtub:"],
":beer:", [":beer:"],
":bell:", [":bell:"],
":bicyclist:", [":bicyclist:"],
":bird:", [":bird:"],
":birthday:", [":birthday:"],
":blossom:", [":blossom:"],
":blue_car:", [":blue_car:"],
":boar:", [":boar:"],
":bomb:", [":bomb:"],
":boom:", [":boom:"],
":bow:", [":bow:"],
":boy:", [":boy:"],
":broken_heart:", [":broken_heart:"],
":bulb:", [":bulb:"],
":bus:", [":bus:"],
":cactus:", [":cactus:"],
":calendar:", [":calendar:"],
":camera:", [":camera:"],
":candy:", [":candy:"],
":cat:", [":cat:"],
":cherries:", [":cherries:"],
":children_crossing:", [":children_crossing:"],
":chocolate_bar:", [":chocolate_bar:"],
":clap:", [":clap:"],
":cloud:", [":cloud:"],
":clubs:", [":clubs:"],
":cn:", [":cn:"],
":coffee:", [":coffee:"],
":construction:", [":construction:"],
":cookie:", [":cookie:"],
":copyright:", [":copyright:"],
":corn:", [":corn:"],
":cow:", [":cow:"],
":crescent_moon:", [":crescent_moon:"],
":crown:", [":crown:"],
":cry:", [":cry:"],
":crystal_ball:", [":crystal_ball:"],
":curly_loop:", [":curly_loop:"],
":dancers:", [":dancers:"],
":dash:", [":dash:"],
":de:", [":de:"],
":diamonds:", [":diamonds:"],
":dog:", [":dog:"],
":doughnut:", [":doughnut:"],
":dragon:", [":dragon:"],
":dvd:", [":dvd:"],
":ear:", [":ear:"],
":eggplant:", [":eggplant:"],
":elephant:", [":elephant:"],
":end:", [":end:"],
":envelope:", [":envelope:"],
":es:", [":es:"],
":eyes:", [":eyes:"],
":facepunch:", [":facepunch:"],
":family:", [":family:"],
":ferris_wheel:", [":ferris_wheel:"],
":finnadie:", [":finnadie:"],
":fire:", [":fire:"],
":fireworks:", [":fireworks:"],
":floppy_disk:", [":floppy_disk:"],
":football:", [":football:"],
":fork_and_knife:", [":fork_and_knife:"],
":four_leaf_clover:", [":four_leaf_clover:"],
":fr:", [":fr:"],
":fries:", [":fries:"],
":frog:", [":frog:"],
":fu:", [":fu:"],
":full_moon:", [":full_moon:"],
":game_die:", [":game_die:"],
":eu:", [":eu:"],
":gem:", [":gem:"],
":girl:", [":girl:"],
":goat:", [":goat:"],
":grimacing:", [":grimacing:"],
":grin:", [":grin:"],
":guardsman:", [":guardsman:"],
":guitar:", [":guitar:"],
":gun:", [":gun:"],
":hamburger:", [":hamburger:"],
":hammer:", [":hammer:"],
":hamster:", [":hamster:"],
":hear_no_evil:", [":hear_no_evil:"],
":heart:", [":heart:"],
":heart_eyes_cat:", [":heart_eyes_cat:"],
":hearts:", [":hearts:"],
":heavy_check_mark:", [":heavy_check_mark:"],
":moyai:", [":moyai:"],
":izakaya_lantern:", [":izakaya_lantern:"],
":helicopter:", [":helicopter:"],
":hocho:", [":hocho:"],
":honeybee:", [":honeybee:"],
":horse:", [":horse:"],
":horse_racing:", [":horse_racing:"],
":hourglass:", [":hourglass:"],
":house:", [":house:"],
":hurtrealbad:", [":hurtrealbad:"],
":icecream:", [":icecream:"],
":imp:", [":imp:"],
":it:", [":it:"],
":jack_o_lantern:", [":jack_o_lantern:"],
":japanese_goblin:", [":japanese_goblin:"],
":jp:", [":jp:"],
":key:", [":key:"],
":kiss:", [":kiss:"],
":kissing_cat:", [":kissing_cat:"],
":koala:", [":koala:"],
":kr:", [":kr:"],
":lemon:", [":lemon:"],
":lipstick:", [":lipstick:"],
":lock:", [":lock:"],
":lollipop:", [":lollipop:"],
":man:", [":man:"],
":maple_leaf:", [":maple_leaf:"],
":mask:", [":mask:"],
":metal:", [":metal:", "U+1F918"],
":microscope:", [":microscope:"],
":moneybag:", [":moneybag:"],
":monkey:", [":monkey:"],
":mount_fuji:", [":mount_fuji:"],
":muscle:", [":muscle:"],
":mushroom:", [":mushroom:"],
":musical_keyboard:", [":musical_keyboard:"],
":musical_score:", [":musical_score:"],
":nail_care:", [":nail_care:"],
":new_moon:", [":new_moon:"],
":no_entry:", [":no_entry:"],
":nose:", [":nose:"],
":notes:", [":notes:"],
":nut_and_bolt:", [":nut_and_bolt:"],
":o:", [":o:"],
":ocean:", [":ocean:"],
":ok_hand:", [":ok_hand:"],
":on:", [":on:"],
":package:", [":package:"],
":palm_tree:", [":palm_tree:"],
":panda_face:", [":panda_face:"],
":paperclip:", [":paperclip:"],
":partly_sunny:", [":partly_sunny:"],
":passport_control:", [":passport_control:"],
":paw_prints:", [":paw_prints:"],
":peach:", [":peach:"],
":penguin:", [":penguin:"],
":phone:", [":phone:"],
":pig:", [":pig:"],
":pill:", [":pill:"],
":pineapple:", [":pineapple:"],
":pizza:", [":pizza:"],
":point_left:", [":point_left:"],
":point_right:", [":point_right:"],
":poop:", [":poop:"],
":poultry_leg:", [":poultry_leg:"],
":pray:", [":pray:"],
":princess:", [":princess:"],
":purse:", [":purse:"],
":pushpin:", [":pushpin:"],
":rabbit:", [":rabbit:"],
":rainbow:", [":rainbow:"],
":raised_hand:", [":raised_hand:"],
":recycle:", [":recycle:"],
":red_car:", [":red_car:"],
":registered:", [":registered:"],
":ribbon:", [":ribbon:"],
":rice:", [":rice:"],
":rocket:", [":rocket:"],
":roller_coaster:", [":roller_coaster:"],
":rooster:", [":rooster:"],
":ru:", [":ru:"],
":sailboat:", [":sailboat:"],
":santa:", [":santa:"],
":satellite:", [":satellite:"],
":satisfied:", [":satisfied:"],
":saxophone:", [":saxophone:"],
":scissors:", [":scissors:"],
":see_no_evil:", [":see_no_evil:"],
":sheep:", [":sheep:"],
":shell:", [":shell:"],
":shoe:", [":shoe:"],
":ski:", [":ski:"],
":skull:", [":skull:"],
":sleepy:", [":sleepy:"],
":smile:", [":smile:"],
":smiley_cat:", [":smiley_cat:"],
":smirk:", [":smirk:"],
":smoking:", [":smoking:"],
":snail:", [":snail:"],
":snake:", [":snake:"],
":snowflake:", [":snowflake:"],
":soccer:", [":soccer:"],
":soon:", [":soon:"],
":space_invader:", [":space_invader:"],
":spades:", [":spades:"],
":speak_no_evil:", [":speak_no_evil:"],
":star:", [":star:"],
":stars:", [":stars:"],
":statue_of_liberty:", [":statue_of_liberty:"],
":steam_locomotive:", [":steam_locomotive:"],
":sunflower:", [":sunflower:"],
":sunglasses:", [":sunglasses:"],
":sunny:", [":sunny:"],
":sunrise:", [":sunrise:"],
":surfer:", [":surfer:"],
":swimmer:", [":swimmer:"],
":syringe:", [":syringe:"],
":tada:", [":tada:"],
":tangerine:", [":tangerine:"],
":taxi:", [":taxi:"],
":tennis:", [":tennis:"],
":tent:", [":tent:"],
":thought_balloon:", [":thought_balloon:"],
":tm:", [":tm:"],
":toilet:", [":toilet:"],
":tongue:", [":tongue:"],
":tophat:", [":tophat:"],
":tractor:", [":tractor:"],
":trolleybus:", [":trolleybus:"],
":trollface:", [":trollface:"],
":trophy:", [":trophy:"],
":trumpet:", [":trumpet:"],
":turtle:", [":turtle:"],
":two_men_holding_hands:", [":two_men_holding_hands:"],
":two_women_holding_hands:", [":two_women_holding_hands:"],
":uk:", [":uk:"],
":umbrella:", [":umbrella:"],
":unlock:", [":unlock:"],
":us:", [":us:"],
":v:", [":v:"],
":vhs:", [":vhs:"],
":violin:", [":violin:"],
":warning:", [":warning:"],
":watermelon:", [":watermelon:"],
":wave:", [":wave:"],
":wavy_dash:", [":wavy_dash:"],
":wc:", [":wc:"],
":wheelchair:", [":wheelchair:"],
":woman:", [":woman:"],
":x:", [":x:"],
":yum:", [":yum:"],
":zap:", [":zap:"],
":zzz:" [":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 package emoji
import "strings"
// Map returns the emoji at the provided position. // Map returns the emoji at the provided position.
// This list is from 0-255 // This list is from 0-255
func Map(b byte) string { func Map(b byte) Words {
return mapGen.EmojiWords[int(b)] return mapGen.EmojiWords[int(b)]
} }
@ -21,5 +21,19 @@ type VersionedMap struct {
Description string `json:"description"` Description string `json:"description"`
Version string `json:"version"` Version string `json:"version"`
// these are an ordered list, referened by a byte (each byte of a checksum digest) // 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. // THIS FILE IS GENERATED. DO NOT EDIT.
package emoji package emoji
func init() { func init() {
mapGen = VersionedMap{ mapGen = VersionedMap{
Description: "", 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", Version: "draft+1",
EmojiWords: []string{ EmojiWords: []Words{
":+1:", Words{ ":+1:",
":8ball:", },
":airplane:", Words{ ":8ball:",
":alien:", },
":anchor:", Words{ ":airplane:",
":angel:", },
":angry:", Words{ ":alien:",
":ant:", },
":apple:", Words{ ":anchor:",
":art:", },
":baby:", Words{ ":angel:",
":baby_bottle:", },
":back:", Words{ ":angry:",
":bamboo:", },
":banana:", Words{ ":ant:",
":barber:", },
":bathtub:", Words{ ":apple:",
":beer:", },
":bell:", Words{ ":art:",
":bicyclist:", },
":bird:", Words{ ":baby:",
":birthday:", },
":blossom:", Words{ ":baby_bottle:",
":blue_car:", },
":boar:", Words{ ":back:",
":bomb:", },
":boom:", Words{ ":bamboo:",
":bow:", },
":boy:", Words{ ":banana:",
":broken_heart:", },
":bulb:", Words{ ":barber:",
":bus:", },
":cactus:", Words{ ":bathtub:",
":calendar:", },
":camera:", Words{ ":beer:",
":candy:", },
":cat:", Words{ ":bell:",
":cherries:", },
":children_crossing:", Words{ ":bicyclist:",
":chocolate_bar:", },
":clap:", Words{ ":bird:",
":cloud:", },
":clubs:", Words{ ":birthday:",
":cn:", },
":coffee:", Words{ ":blossom:",
":construction:", },
":cookie:", Words{ ":blue_car:",
":copyright:", },
":corn:", Words{ ":boar:",
":cow:", },
":crescent_moon:", Words{ ":bomb:",
":crown:", },
":cry:", Words{ ":boom:",
":crystal_ball:", },
":curly_loop:", Words{ ":bow:",
":dancers:", },
":dash:", Words{ ":boy:",
":de:", },
":diamonds:", Words{ ":broken_heart:",
":dog:", },
":doughnut:", Words{ ":bulb:",
":dragon:", },
":dvd:", Words{ ":bus:",
":ear:", },
":eggplant:", Words{ ":cactus:",
":elephant:", },
":end:", Words{ ":calendar:",
":envelope:", },
":es:", Words{ ":camera:",
":eyes:", },
":facepunch:", Words{ ":candy:",
":family:", },
":ferris_wheel:", Words{ ":cat:",
":finnadie:", },
":fire:", Words{ ":cherries:",
":fireworks:", },
":floppy_disk:", Words{ ":children_crossing:",
":football:", },
":fork_and_knife:", Words{ ":chocolate_bar:",
":four_leaf_clover:", },
":fr:", Words{ ":clap:",
":fries:", },
":frog:", Words{ ":cloud:",
":fu:", },
":full_moon:", Words{ ":clubs:",
":game_die:", },
":eu:", Words{ ":cn:",
":gem:", },
":girl:", Words{ ":coffee:",
":goat:", },
":grimacing:", Words{ ":construction:",
":grin:", },
":guardsman:", Words{ ":cookie:",
":guitar:", },
":gun:", Words{ ":copyright:",
":hamburger:", },
":hammer:", Words{ ":corn:",
":hamster:", },
":hear_no_evil:", Words{ ":cow:",
":heart:", },
":heart_eyes_cat:", Words{ ":crescent_moon:",
":hearts:", },
":heavy_check_mark:", Words{ ":crown:",
":moyai:", },
":izakaya_lantern:", Words{ ":cry:",
":helicopter:", },
":hocho:", Words{ ":crystal_ball:",
":honeybee:", },
":horse:", Words{ ":curly_loop:",
":horse_racing:", },
":hourglass:", Words{ ":dancers:",
":house:", },
":hurtrealbad:", Words{ ":dash:",
":icecream:", },
":imp:", Words{ ":de:",
":it:", },
":jack_o_lantern:", Words{ ":diamonds:",
":japanese_goblin:", },
":jp:", Words{ ":dog:",
":key:", },
":kiss:", Words{ ":doughnut:",
":kissing_cat:", },
":koala:", Words{ ":dragon:",
":kr:", },
":lemon:", Words{ ":dvd:",
":lipstick:", },
":lock:", Words{ ":ear:",
":lollipop:", },
":man:", Words{ ":eggplant:",
":maple_leaf:", },
":mask:", Words{ ":elephant:",
":metal:", },
":microscope:", Words{ ":end:",
":moneybag:", },
":monkey:", Words{ ":envelope:",
":mount_fuji:", },
":muscle:", Words{ ":es:",
":mushroom:", },
":musical_keyboard:", Words{ ":eyes:",
":musical_score:", },
":nail_care:", Words{ ":facepunch:",
":new_moon:", },
":no_entry:", Words{ ":family:",
":nose:", },
":notes:", Words{ ":ferris_wheel:",
":nut_and_bolt:", },
":o:", Words{ ":finnadie:",
":ocean:", },
":ok_hand:", Words{ ":fire:",
":on:", },
":package:", Words{ ":fireworks:",
":palm_tree:", },
":panda_face:", Words{ ":floppy_disk:",
":paperclip:", },
":partly_sunny:", Words{ ":football:",
":passport_control:", },
":paw_prints:", Words{ ":fork_and_knife:",
":peach:", },
":penguin:", Words{ ":four_leaf_clover:",
":phone:", },
":pig:", Words{ ":fr:",
":pill:", },
":pineapple:", Words{ ":fries:",
":pizza:", },
":point_left:", Words{ ":frog:",
":point_right:", },
":poop:", Words{ ":fu:",
":poultry_leg:", },
":pray:", Words{ ":full_moon:",
":princess:", },
":purse:", Words{ ":game_die:",
":pushpin:", },
":rabbit:", Words{ ":eu:",
":rainbow:", },
":raised_hand:", Words{ ":gem:",
":recycle:", },
":red_car:", Words{ ":girl:",
":registered:", },
":ribbon:", Words{ ":goat:",
":rice:", },
":rocket:", Words{ ":grimacing:",
":roller_coaster:", },
":rooster:", Words{ ":grin:",
":ru:", },
":sailboat:", Words{ ":guardsman:",
":santa:", },
":satellite:", Words{ ":guitar:",
":satisfied:", },
":saxophone:", Words{ ":gun:",
":scissors:", },
":see_no_evil:", Words{ ":hamburger:",
":sheep:", },
":shell:", Words{ ":hammer:",
":shoe:", },
":ski:", Words{ ":hamster:",
":skull:", },
":sleepy:", Words{ ":hear_no_evil:",
":smile:", },
":smiley_cat:", Words{ ":heart:",
":smirk:", },
":smoking:", Words{ ":heart_eyes_cat:",
":snail:", },
":snake:", Words{ ":hearts:",
":snowflake:", },
":soccer:", Words{ ":heavy_check_mark:",
":soon:", },
":space_invader:", Words{ ":moyai:",
":spades:", },
":speak_no_evil:", Words{ ":izakaya_lantern:",
":star:", },
":stars:", Words{ ":helicopter:",
":statue_of_liberty:", },
":steam_locomotive:", Words{ ":hocho:",
":sunflower:", },
":sunglasses:", Words{ ":honeybee:",
":sunny:", },
":sunrise:", Words{ ":horse:",
":surfer:", },
":swimmer:", Words{ ":horse_racing:",
":syringe:", },
":tada:", Words{ ":hourglass:",
":tangerine:", },
":taxi:", Words{ ":house:",
":tennis:", },
":tent:", Words{ ":hurtrealbad:",
":thought_balloon:", },
":tm:", Words{ ":icecream:",
":toilet:", },
":tongue:", Words{ ":imp:",
":tophat:", },
":tractor:", Words{ ":it:",
":trolleybus:", },
":trollface:", Words{ ":jack_o_lantern:",
":trophy:", },
":trumpet:", Words{ ":japanese_goblin:",
":turtle:", },
":two_men_holding_hands:", Words{ ":jp:",
":two_women_holding_hands:", },
":uk:", Words{ ":key:",
":umbrella:", },
":unlock:", Words{ ":kiss:",
":us:", },
":v:", Words{ ":kissing_cat:",
":vhs:", },
":violin:", Words{ ":koala:",
":warning:", },
":watermelon:", Words{ ":kr:",
":wave:", },
":wavy_dash:", Words{ ":lemon:",
":wc:", },
":wheelchair:", Words{ ":lipstick:",
":woman:", },
":x:", Words{ ":lock:",
":yum:", },
":zap:", Words{ ":lollipop:",
":zzz:", },
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() 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 { if err := mapGoTemp.Execute(output, vm); err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -42,5 +51,47 @@ func main() {
var ( var (
flInput = flag.String("in", "emojimap.json", "json input") flInput = flag.String("in", "emojimap.json", "json input")
flOutput = flag.String("out", "map_gen.go", "golang output") 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 { func emojiFromBytes(buf []byte) string {
var ret string var ret string
for _, b := range buf { 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 return ret
} }