signal example
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
94c9d40eee
commit
ffa7c3c4b8
4 changed files with 41 additions and 0 deletions
38
signal-ex/main.go
Normal file
38
signal-ex/main.go
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/emojisum/emojisum/emoji"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
buf, err := ioutil.ReadFile("num")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
os.Exit(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
str := strings.Replace(string(buf), " ", "", -1)
|
||||||
|
i := 0
|
||||||
|
for {
|
||||||
|
if i >= len(str) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if strings.Contains(str[i:i+1], "\n") {
|
||||||
|
i += 1
|
||||||
|
fmt.Print("\n")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
d, err := emoji.FromHexString(str[i : i+2])
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
os.Exit(2)
|
||||||
|
}
|
||||||
|
i += 2
|
||||||
|
fmt.Print(d)
|
||||||
|
}
|
||||||
|
}
|
3
signal-ex/num
Normal file
3
signal-ex/num
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
1589431412 8991911005
|
||||||
|
5208747685 9704261801
|
||||||
|
9636252115 2237458346
|
BIN
signal-ex/signal_fingerprint_after.png
Normal file
BIN
signal-ex/signal_fingerprint_after.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 249 KiB |
BIN
signal-ex/signal_fingerprint_before.png
Normal file
BIN
signal-ex/signal_fingerprint_before.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
Loading…
Reference in a new issue