Skip to content

Commit 288f094

Browse files
committed
update release
1 parent 8791ed2 commit 288f094

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

.goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ builds:
1616
- 386
1717
ldflags:
1818
- -s -w
19-
ignore: # problems with build https://github.com/golang/go/issues/39033
20-
- goos: darwin
19+
ignore: # problems with build
20+
- goos: windows
2121
goarch: arm64
2222
archives:
2323
- replacements:

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[comment]: <> (**A**ny **C**haracter **E**ncoding **S**et)
44
Any Character Encoding Set
55

6-
Aces is a command line utility that lets you encode any file to a character set of your choice.
6+
Aces is a command line utility that lets you encode any data to a character set of your choice.
77

88
For example, you could encode "Foo Bar" to a combination of these four characters: "HhAa", resulting in this ~~hilarious~~ sequence of laughs:
99
```text
@@ -21,6 +21,12 @@ If you're on macOS, you can even convert that output to speech:
2121
echo -n "Matthew Stanciu" | aces HhAa | say
2222
```
2323

24+
Make your own wacky encoding:
25+
```shell
26+
$ echo HELLO WORLD | aces "DORK BUM"
27+
RRD RBO RKD M DRBU MBRRRKD RDOR
28+
```
29+
2430
With Aces, you can see the actual 0s and 1s of files:
2531
```shell
2632
aces 01 < $(which echo)

aces.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func main() {
8989
return
9090
}
9191

92+
//b, err := ioutil.ReadAll(os.Stdin)
93+
//fmt.Println("yooooo")
94+
//fmt.Printf("%x", sha256.Sum256(b))
95+
//return
96+
97+
//fmt.Println("ok")
9298
bs := bitStreamer{chunkLen: numOfBits, in: os.Stdin}
9399
err := bs.init()
94100
if err != nil {
@@ -97,16 +103,21 @@ func main() {
97103
res := make([]byte, 0, 2*1024)
98104
for {
99105
chunk, err := bs.next()
106+
//fmt.Print(chunk, ";")
100107
if err != nil {
101108
if err == io.EOF {
109+
//fmt.Println("rune set: ", encodeHaHa)
110+
//fmt.Println("triggered write2")
102111
os.Stdout.Write(res)
103-
os.Stdout.WriteString("\n")
112+
//os.Stdout.WriteString("\n")
113+
os.Stdout.Close()
104114
return
105115
}
106116
panic(err)
107117
}
108-
res = append(res, []byte(string(encodeHaHa[chunk]))...)
109-
if len(res) > 1024 {
118+
res = append(res, string(encodeHaHa[chunk])...)
119+
if len(res) > 1024*7/2 {
120+
//fmt.Println("triggered write")
110121
os.Stdout.Write(res)
111122
res = make([]byte, 0, 2*1024)
112123
}
@@ -159,6 +170,7 @@ func (bs *bitStreamer) next() (b byte, e error) {
159170
currByte := bs.buf[byteNum]
160171
didChange := false
161172
if byteNum+1 >= bs.bufN { // unlikely
173+
//fmt.Println("OMG OMG OMG OMG HELLO HELLO")
162174
didChange = true
163175
eh := make([]byte, 1)
164176
_, err := bs.in.Read(eh) // the actual data size doesn't change so we won't change n

0 commit comments

Comments
 (0)