Hext
⬡🔡 R package: make a text-based hex sticker
Install / Use
/learn @matt-dray/HextREADME
hext
<!-- badges: start --> <!-- badges: end --> ________
/ \
/ he \
\ xt /
\________/
About
Hex stickers… but text.
Bye, hex stickers. Inspired by artistry in Yihui’s {litedown} and then Charlie’s {secretbase}.
Install
The package is a GitHub exclusive for now.
install.packages("pak") # if not yet installed
pak::pak("matt-dray/hext")
Quality not guaranteed.
Use
You can add text (text_*) and align it (align_*) for each of your
hex’s four writable lines (*_1 to *_4). You cannot exceed the
allotted character width inside the hex border.
Here’s the simple logo for this package:
hext::hext(
# You can adjust placement with spaces
text_2 = "he ",
text_3 = " xt"
)
# ________
# / \
# / he \
# \ xt /
# \________/
Alignment defaults to centre, but you can change it:
# fmt: skip
hext::hext(
"hello", "this", "is", "hext",
"left", "right", "centre", "left"
)
# ________
# /hello \
# / this\
# \ is /
# \hext____/
Rendering is hard. Platforms and tools will vary in how they present the same logo.
In particular, your kilometreage may vary with Unicode characters, including emojis.
hext::hext(
"😀",
"✋👔🤚",
"👖",
"👟👟"
)
# ________
# / 😀 \
# / ✋👔🤚 \
# \ 👖 /
# \__👟👟__/
hext() defaults to assessing the display width of text. In the spirit
of fudging it, use count_type = "chars" to count characters instead.
ASCII art is encouraged. Here is a cat.
hext_cat <- hext::hext(
r"{/\__/\}", # escape with raw strings
"={ o x o}=",
"l( u u )",
"_b___b",
print = FALSE # return char vector invisibly
)
hext_cat |> cat()
# ________
# / /\__/\ \
# /={ o x o}=\
# \l( u u ) /
# \__b___b_/
The Text-Stickers Standard
You may be aware of the the Stickers Standard.
For the purposes of {hext}, the standard is:
- 2 spaces, 8 underscores.
- 1 space, 1 slash, 8 spaces, 1 backslash.
- 1 slash, 10 spaces, 1 backslash.
- 1 backslash, 10 spaces, 1 slash.
- 1 space, 1 backslash, 8 underscores, 1 slash.
A world beyond text?
If you’re interested in jpegs or whatever, see:
- {hexSticker} by Guangchang Yu
- hexmake by Colin Fay
- {bunny} by Dmytro Perepolkin
- {gex} by Matt Dray (disclaimer: that’s my name)
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
