-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
120 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- freebsd | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- 386 | ||
ldflags: | ||
- -s -w | ||
ignore: # problems with build https://github.com/golang/go/issues/39033 | ||
- goos: darwin | ||
goarch: arm64 | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: 32-bit | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
brews: | ||
- | ||
# Repository to push the tap to. | ||
tap: | ||
owner: quackduck | ||
name: homebrew-tap | ||
|
||
homepage: 'https://github.com/quackduck/aces' | ||
|
||
description: 'Encode in a character set of your choice' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Aces | ||
|
||
[comment]: <> (**A**ny **C**haracter **E**ncoding **S**et) | ||
Any Character Encoding Set | ||
|
||
Aces is a command line utility that lets you encode any file to a character set of your choice. | ||
|
||
For example, you could encode "Foo Bar" to a combination of these four characters: "HhAa", resulting in this ~~hilarious~~ sequence of laughs: | ||
```text | ||
hHhAhAaahAaaHAHHhHHAhAHhhaHA | ||
``` | ||
With Aces installed, you can actually do that with: | ||
```shell | ||
$ echo -n "Foo Bar" | aces HhAa | ||
hHhAhAaahAaaHAHHhHHAhAHhhaHA | ||
``` | ||
This was the original use of Aces (it was called `ha`, increased data size by 4X and had no decoder) | ||
|
||
If you're on macOS, you can even convert that output to speech: | ||
```shell | ||
$ echo -n "Matthew Stanciu" | aces HhAa | say | ||
``` | ||
|
||
With Aces, you can see the actual 0s and 1s of files: | ||
```shell | ||
$ aces 01 < $(which echo) | ||
``` | ||
You can also write hex/octal/binary/your own format by hand: | ||
```shell | ||
$ echo C2A7 | aces -d 0123456789ABCDEF | ||
$ echo .+=. | aces -d ./+= # try this! | ||
``` | ||
|
||
## Installing | ||
|
||
### macOS or Linux with linuxbrew | ||
```shell | ||
brew install quackduck/tap/aces | ||
``` | ||
|
||
### Other platforms | ||
Head over to [releases](https://github.com/quackduck/aces/releases) and download the latest binary! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
go install | ||
if [ "$(echo "heyheya " | aces 0123456789ABCDEF)" = "68657968657961200A" ]; then | ||
echo passed hex conversion | ||
else | ||
echo you stupid idiot the test failed | ||
fi | ||
|
||
if diff <(aces 0123456789ABCDEF < "$(which bash)" | aces -d 0123456789ABCDEF) "$(which bash)"; then | ||
echo whoa man, even the huge binary check worked | ||
else | ||
echo you stupid idiot the binary check failed | ||
fi | ||
#if [ "$(echo "heyheya " | aces 0123456789ABCDEF)" = "68657968657961200A" ]; then | ||
# echo passed hex conversion | ||
#else | ||
# echo you stupid idiot the test failed | ||
#fi | ||
|
||
[ "$(echo "heyheya " | aces 0123456789ABCDEF)" = "68657968657961200A" ] || echo HEX CHECK FAILED, slap the programmer | ||
|
||
#if diff <(aces 0123456789ABCDEF < "$(which bash)" | aces -d 0123456789ABCDEF) "$(which bash)"; then | ||
# echo whoa man, even the huge binary check worked | ||
#else | ||
# echo you stupid idiot the binary check failed | ||
#fi | ||
|
||
diff <(aces 0123456789ABCDEF < "$(which bash)" | aces -d 0123456789ABCDEF) "$(which bash)" || echo big binary check failed, slap the programmer | ||
|
||
echo hello world | aces "<>(){}[]" | aces --decode "<>(){}[]" > /dev/null || echo example 1 failed | ||
echo matthew stanciu | aces HhAa > /dev/null || echo example 2 failed | ||
aces " X" < /bin/echo > /dev/null || echo example 3 failed | ||
echo 0100100100100001 | aces -d 01 | aces 01234567 > /dev/null || echo example 4 failed | ||
echo Calculus | aces 01 > /dev/null || echo example 5 failed | ||
echo "Aces™" | base64 | aces -d ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ > /dev/null || echo example 6 failed |