A small CLI utility for translating between HEX and ASCII/UTF-8.
Go to file
Bryn Miller 7200fd8d57 Unable to keep jarfile in Releases, encourage to build from source instead 2023-09-23 17:41:42 +02:00
.gitattributes Init commit, complete but open to suggestions 2023-08-01 14:05:16 -04:00
.gitignore updated gitignore 2023-09-18 13:14:54 -04:00
CharTable.kt Init commit, complete but open to suggestions 2023-08-01 14:05:16 -04:00
HexLib.kt Init commit, complete but open to suggestions 2023-08-01 14:05:16 -04:00
README.md Unable to keep jarfile in Releases, encourage to build from source instead 2023-09-23 17:41:42 +02:00
main.kt Added 2 argument functionality 2023-09-18 13:13:12 -04:00

README.md

CharTools

A small program for HEX-ASCII (or UTF-8) conversion.

This program is converted and improved from one I wrote in Scala as a way of further familiarizing myself with Kotlin, as I'd like to move to Android dev in the future.

Put It On Your Computer!

Build From Source

Requires the Kotlin compiler, available via SDKMAN! on MacOS and Linux, or as a direct download on all platforms.

Quick and easy to compile. Clone the repo and go into it:

git clone https://github.com/digital-diplomat/CharTools.git
cd CharTools

Then compile it to a jarfile with kotlinc, making sure to include include the Kotlin runtime (so it can be run in Java…or at all).

kotlinc * -include-runtime -d chartools.jar

It can then be run with java -jar chartools.jar, or on some Linux distros it can be set to executable (chmod +x chartools.jar) and run directly (./chartools.jar).

On Windows and MacOS, if it was set up on Java install, you can also double-click the jarfile in your file explorer to open/run it.

Usage

When invoked without an argument, an interactive session is started which can be used for multiple translations in a row. You can also pass an argument to the program to handle just one conversion:

e(ncode) - Prompts for a string to encode
d(ecode) - Prompts for a space- or comma-separated string of hex values to decode
t(able)  - Prints an ASCII table from 0x20 to 0x7f
f        - Pays respects

For decoding HEX strings, the values can be separated by any number of commas and/or spaces.

Contributing

Please submit a pull request or issue if you have any suggestions for improvement; I'm always looking for new ways to improve my methodology and can always use a bit of guidance!

54 68 61 6e 6b 73 20 66 6f 72 20 64 6f 77 6e 6c 6f 61 64 69 6e 67 21