art.frames
arrange text pictures: boxes and speech bubbles, side by side, stacked, overlaid, flipped, rotated, scaled
Frames treat a text picture as a block of lines. You can put a box or speech bubble around one, set two side by side or stack them, lay one over another, and flip, rotate or scale the result.
Tags: art
boxeddraw a box around textsaya clip art picture saying s in a speech bubble: the cow, or any clipart() namecowsaythe same as say, named after the classic Unix programthinklike say, but in a thought bubblebesideput picture b to the right of picture a, tops lined up, with gap spaces betweenstackput picture b under picture a, lined up “left”, “center” or “right”overlaydraw picture b on top of picture a, with b’s top-left corner at column x and row y of a (counting from 0)mirrorflip a picture left to right (“h”) or upside down (“v”)rotateturn a picture clockwise by 90, 180 or 270 degreesscalemake a picture n times bigger by repeating each character n times across and n times downnegativeswap ink and background: spaces become solid blocks and the other way round, and braille dots are invertedtrim_artremove blank lines at the top and bottom, indentation every line shares, and spaces at the ends of lines
Functions
Section titled “Functions”boxed(s: str, style: str = “single”) -> str
draw a box around text
style is “single”, “double”, “round”, “heavy”, “ascii”, “stars” or “shadow”
1boxed("hello")┌───────┐
│ hello │
└───────┘2"zil\ncalc".boxed("round")╭──────╮
│ zil │
│ calc │
╰──────╯say(s: str, art: str = “cow”) -> str
a clip art picture saying s in a speech bubble: the cow, or any clipart() name
1say("moo") _____
< moo >
-----
\
\
(__)
(oo)
/-------\/
/ | ||
* ||----||
~~ ~~2say("pika", "pikachu") ______
< pika >
------
\
\
(\__/)
(o^.^o)
z(_(")(")cowsay
Section titled “cowsay”cowsay(s: str, art: str = “cow”) -> str
the same as say, named after the classic Unix program
1cowsay("moo") _____
< moo >
-----
\
\
(__)
(oo)
/-------\/
/ | ||
* ||----||
~~ ~~See also say
think(s: str, art: str = “cow”) -> str
like say, but in a thought bubble
1think("hmm", "ghost") _____
( hmm )
-----
o
o
.-.
(o o)
| O \
\ \
`~~~'See also say
beside
Section titled “beside”beside(a: str, b: str, gap: int = 1) -> str
put picture b to the right of picture a, tops lined up, with gap spaces between
1"a\nb".beside("c\nd\ne")a c
b d
estack(a: str, b: str, align: str = “left”) -> str
put picture b under picture a, lined up “left”, “center” or “right”
1"wide one".stack("x", "right")wide one
xSee also beside
overlay
Section titled “overlay”overlay(a: str, b: str, x: int, y: int) -> str
draw picture b on top of picture a, with b’s top-left corner at column x and row y of a (counting from 0)
Spaces in b let a show through
1boxed(" ").overlay("hi", 2, 1)┌───────┐
│ hi │
└───────┘See also beside
mirror
Section titled “mirror”mirror(s: str, axis: str = “h”) -> str
flip a picture left to right (“h”) or upside down (“v”)
Slashes and brackets are swapped so the shapes still look right
1"(=^.^=)/".mirror"\\(=^.^=)"2"/\\\n\\/".mirror("v")/\
\/rotate
Section titled “rotate”rotate(s: str, degrees: int) -> str
turn a picture clockwise by 90, 180 or 270 degrees
1"abc\ndef".rotate(90)da
eb
fcSee also mirror
scale(s: str, n: int) -> str
make a picture n times bigger by repeating each character n times across and n times down
1"ab".scale(2)aabb
aabbSee also banner
negative
Section titled “negative”negative(s: str) -> str
swap ink and background: spaces become solid blocks and the other way round, and braille dots are inverted
1"▀ █".negative"▄█ "See also invert
trim_art
Section titled “trim_art”trim_art(s: str) -> str
remove blank lines at the top and bottom, indentation every line shares, and spaces at the ends of lines
1"\n ab\n c\n\n".trim_artab
cSee also dedent
More examples
Section titled “More examples”compose
Section titled “compose”1# a caption under a picture2clipart("owl").stack("hoo?", "center") ,_,
(O,O)
( )
-"-"-
hoo?3# two friends4clipart("cat").beside(clipart("dog"), 4) /\_/\ __ _
( o.o ) o'')}____//
> ^ < `_/ )
(_(_/-(_/5# a cat says6say("deploy on friday?", "cat") ___________________
< deploy on friday? >
-------------------
\
\
/\_/\
( o.o )
> ^ <7# a picture frame8clipart("house").boxed("double").boxed("shadow")┌──────────────┐
│ ╔══════════╗ │▒
│ ║ /\ ║ │▒
│ ║ / \ ║ │▒
│ ║ /____\ ║ │▒
│ ║ | [] | ║ │▒
│ ║ |_||_| ║ │▒
│ ╚══════════╝ │▒
└──────────────┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒9# a sky of black stars on white10starfield(20, 4, 1).negative████ █████ █ ███████
██████████████ █████
█████ ██████ ██████Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.