a tool to create keybinds for ascii art images
ensure you have go (>=1.26) installed. other than that, there are no external dependencies to install.
to install socktool as a binary to your GOPATH, run:
go install github.com/cocoelacanth/socktool@latestto build the socktool binary, run:
git clone https://github.com/cocoelacanth/socktool
cd socktool
mkdir -p bin
go build -o ./bin .$ socktool -hUsage: socktool [flags] <json> <imgs>
Required arguments:
json
the JSON file to parse
imgs
the location to search for image files
Optional flags:
-chars string
a custom set of characters use in the ASCII art
-color
enable colored ASCII art
- create a folder with all your images
- create a json file with entries for each image/animation
- run socktool
- press a keybind to display an image!
- .jpeg, .jpg
- .png
- .bmp
- .webp
- .tiff, .tif
looping image sequences are supported, but animated gifs are not.
{
"q": {
"frames": ["foo.png"]
},
"w": {
"frames": [
"bar/frame_1.png",
"bar/frame_2.png",
"bar/frame_3.png"
],
"delay": 100,
"loop": 1000
}
}"q"/"w"- the desired key as a string- some key combinations, like
"ctrl+w","ctrl+y", etc. are also supported
- some key combinations, like
"frames"- chronological array of frames to display, separated with commas"delay"- millisecond gap between frames (100= 0.1s = 10 FPS)- omit to disable animation
"loop"- millisecond pause between loops- omit to use
"delay"value
- omit to use
this project is licensed under the GNU GPLv3. see LICENSE for details.
this project includes software from:
- https://github.com/charmbracelet/bubbletea
- licensed under the MIT License
- https://github.com/charmbracelet/lipgloss
- licensed under the MIT License
- https://github.com/TheZoraiz/ascii-image-converter
- licensed under the Apache License 2.0
see LICENSES/ for details.