emojisum

:pray: :paperclip: Emoji that checksum! :tada: :poop:

Github星跟踪图

Emojisum

Build Status

:pray: :paperclip: Emoji that checksum! :tada: :poop:

A curated list of 256 emojis that are not entirely similar.
Using http://www.webpagefx.com/tools/emoji-cheat-sheet/ and http://www.unicode.org/emoji/charts/full-emoji-list.html to compare them.
With 256 as that is 8bit/1byte, and the hexadecimal output that is 2 hex characters.

So 2 hex positions are 1 emoji!
Would you rather compare 60 hexadecimal characters or only 30 emoji?! :smiley_cat:

Specification

For information on the draft for broader practice, see the draft.
Perma-URL:

Tool

build

go get github.com/emojisum/emojisum

usage

This uses github.com/kyokomi/emoji to print to the console, but also gives the string ouptut for easy pasting to github/markdown.

$> emojisum main.go 
SHA1(main.go)=  14b09535217ca8f5f47f4665e2266e686f0728b4
SHA1(main.go)=  :bird::red_car::on::crystal_ball::calendar::lemon::pray::warning::violin::lollipop::facepunch::hearts::tm::children_crossing::hourglass::heavy_plus_sign::house::ant::clap::rocket:
SHA1(main.go)=  ? ? ? ? ? ? ? ⚠️? ? ? ♥️™️? ⌛️➕ ? ? ? ? 

Like so!

SHA1(main.go)= :bird::red_car::on::crystal_ball::calendar::lemon::pray::warning::violin::lollipop::facepunch::hearts::tm::children_crossing::hourglass::heavy_plus_sign::house::ant::clap::rocket:

pass in the checksums

Rather than relying on this simple tool to do the checksum itself, you will likely want to rely on OpenSSL or coreutils for checksumming.
emojisum can just take those formats on stdin:

$> sha1sum main.go, emojisum -pg
7656835947b4c6da272023c56b6f2529511bf88b  main.go
:jp::gb::metal::goat::family::rocket::smiley_cat::swimmer::chocolate_bar::cactus::candy::smile::honeybee::house::cherries::cloud::fries::bow::wavy_dash::musical_score:  main.go
?? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ☁️? ? 〰️ ?   main.go

Like so:

?? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ☁️? ? 〰️ ? main.go

$> openssl sha1 main.go, emojisum -pb
SHA1(main.go)= 7656835947b4c6da272023c56b6f2529511bf88b
SHA1(main.go)= :jp::gb::metal::goat::family::rocket::smiley_cat::swimmer::chocolate_bar::cactus::candy::smile::honeybee::house::cherries::cloud::fries::bow::wavy_dash::musical_score:
SHA1(main.go)= ?? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ☁️? ? 〰️ ? 

And like so:

SHA1(main.go)= ?? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ☁️? ? 〰️ ?

Library

Use the golang library to access the mapped emoji words:

package main

import (
  "fmt"

  "github.com/emojisum/emojisum/emoji"
)

func main() {
  for i := 0; i < 255; i++ {
    fmt.Printf("%d (%2.2x):\n", i, i)
    for _, word := range emoji.Map(byte(i)) {
      fmt.Printf("  - %s\n", emoji.CodepointToUnicode(word))
    }
  }
}

Contributed Implementations

Rust

In ./contrib/emojisum-rs/ you'll find a rust library for emojisum.

Build

cd ./contrib/emojisum-rs/
cargo build

Test

cargo test

主要指标

概览
名称与所有者emojisum/emojisum
主编程语言Go
编程语言Go (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2016-12-02 16:34:28
推送于2025-04-01 18:55:37
最后一次提交2025-04-01 13:55:33
发布数2
最新版本名称draft+2 (发布于 2021-11-23 11:11:43)
第一版名称draft+1 (发布于 2017-02-10 13:52:01)
用户参与
星数279
关注者数2
派生数12
提交数92
已启用问题?
问题数9
打开的问题数2
拉请求数30
打开的拉请求数1
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?