devottys / darkdraw

unicode art and animation in the terminal
Other
63 stars 4 forks source link

DarkDraw II

Art and animation for the terminal, in the terminal.

darkdraw

A brief history of the project.

All art and animations in this README were created by dwimmer using DarkDraw.

Platform requirements

Install

DarkDraw is a plugin for VisiData. There are two ways to install it.

Install VisiData first

  1. Ensure Python3 and pip3 are installed on your system.
    python3 --version
    pip3 --version
  1. Install the latest VisiData release from GitHub:
    pip3 install visidata
  1. Then once installed launch VisiData:
    vd
  1. Install the latest darkdraw release from GitHub:
    pip3 install git+https://github.com/devottys/darkdraw.git@master

Use existing Dockerfile (default opens with a tutorial)

  1. Clone the darkdraw directory
git clone https://github.com/devottys/darkdraw.git
cd darkdraw
  1. Build the Docker image
docker build -t darkdraw .
  1. Then whenever you want to run darkdraw with its tutorial
docker run --rm -it darkdraw

Usage

Darkdraw is a VisiData plugin, to use the darkdraw loader with a new project, have VisiData open a new filetype with the suffix *.ddw.

    vd foo.ddw

To start, you can play with some of the samples:

    vd https://bluebird.sh/ddw/colors.ddw
    vd https://bluebird.sh/ddw/bouncyball.ddw
    vd https://bluebird.sh/ddw/arrows.ddw
    vd https://bluebird.sh/ddw/bw16colors.ddw

or with the tutorial:

vd https://bluebird.sh/ddw/darkdraw-tutorial.ddw

If pulling from the url does not work, try downloading the file, and then:

vd colors.ddw
vd darkdraw-tutorial.ddw

faerie fire

Commands

Backing sheet

The drawing is rendered from a straightforward list of items with x/y/text/color and other attributes. This list can be used directly and is called the 'backing sheet'.

Movement

Cursor

Selection

Tags

Extra hotkeys

In visibility mode 1, tags are shown on the right side. Press the two-digit number (e.g. 01) before the tag to hide/unhide objects in that tag. Use g01 to select and z01 to unselect objects with that tag. Press 00 to unhide all tags.

These extra hotkeys will function regardless of whether they are currently shown.

Character positioning

Editing

Clipboard (copy/paste)

Glyph Discovery

Color

Color values

Color values are strings like '<attr> <fgcolorname> on <bgcolorname>'. Any of these may be omitted; order does not matter. fg and bg/on indicate whether the color is the foreground or background.

Groups

Groups are handled as a single entity, both on the drawing and on the backing sheet.

Animation

If an object or group has its 'frame' attribute set, it will only be drawn in frames with that id.

VisiData commands (not specific to DarkDraw)

panes and windows

Options

Notes for VisiData users