Tart - draw ASCII art in the terminal with your mouse!
_____ _ ____ _____ _
(_ _)/ \ | (_ _)| |
| | / ^ \ | O || | |_|
| |/ ___ \| _ < | | _
|_|_/ \_|_| \_\|_| |_|
Tart is a program that provides an image-editor-like interface to creating ASCII art - in the terminal, with your mouse! This program is written using my purely-functional terminal user interface toolkit, Brick.
Expectation management: This is a fun hobby project that I spent time on when I first created it many years ago. Since then, I have only done a little bit to keep it working. Since it was (and still is) mostly intended as a proof of concept, and since I do not use the tool actively, I have not been putting much energy into maintaining it beyond keeping it building. While that isn't likely to change, I am happy to support people who want to contribute to the tool and I may have energy to fix small things as they are reported. Use at your own risk. If other tools are more mature or perform better, you are probably better off using them!
tart
is a Haskell project. You'll need
GHC (preferably at least 8.2) and
cabal-install
(preferably at least 2.0). Then:
$ git clone https://github.com/jtdaugherty/tart.git
$ cd tart
$ cabal new-build
$ $(find . -name tart -type f)
By default, tart
is built as both a library and a command-line tool.
But if you want to use tart only for its Haskell library and avoid the
additional executable dependencies, you can build with the libonly
cabal build flag.
tart
has been tested extensively with the following terminal emulators
and is known to work well with them:
iTerm2
Terminal.app
Please let me know if you use tart
with another emulator and let me
know how well it works!
Tools / styles:
0
..9
: select tooly
: open the attribute style selector!
/@
/#
/$
: select attribute stylef
/b
: open foreground / background palette selectorsc
: set tool drawing character (where applicable)<
/>
: decrease / increase tool size (where applicable)Esc
: cancel tool drag (e.g. box)Canvas:
w
/a
/s
/d
: move canvasC
: re-center canvasv
: set canvas size-
/+
: decrease / increase canvas sizeLayers:
C-a
: add new layerC-r
: rename current layerC-n
/C-p
: select next/previous layerC-x
: delete selected layerC-u
/C-d
: move current layer up / downC-v
: toggle selected layer's visibilityC-l
: toggle visibility of layer listGeneral:
q
: quit (and optionally save)C-s
: saveu
: undor
: redoTart requires a terminal with mouse support. You use various tools (such as freehand drawing, boxes, etc.) to draw ASCII pictures. You can set a current foreground and background color. You can also resize the drawing canvas to get the desired output size. When you're finished, you can save to disk, at which point Tart creates three files:
foo.tart
) suitable for reloading with Tart for
further editing laterfoo.color.txt
containing the ASCII art with terminal
color escape sequences, suitable for emitting to terminalsfoo.plain.txt
containing the ASCII art without terminal
color escape sequences, suitable for embedding in documentationIf you decide to contribute, that's great! Here are some guidelines you should consider to make submitting patches easier for all concerned: