Skip to content

matt-dray/hext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

hext

Project Status: Concept โ€“ Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept. R-CMD-check format-check.yaml jarl-check

 ________ / \ / 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:

  1. 2 spaces, 8 underscores.
  2. 1 space, 1 slash, 8 spaces, 1 backslash.
  3. 1 slash, 10 spaces, 1 backslash.
  4. 1 backslash, 10 spaces, 1 slash.
  5. 1 space, 1 backslash, 8 underscores, 1 slash.

A world beyond text?

If youโ€™re interested in jpegs or whatever, see:

About

โฌก๐Ÿ”ก R package: make a text-based hex sticker

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Contributors

Languages