AsciiWriter

From creative crowd wiki
Revision as of 15:43, 7 April 2023 by Manetta (talk | contribs)
Jump to navigation Jump to search


About asciiWriter

A python library to draw with plain text in ASCII art style (but with Unicode).

Install

$ pip3 install asciiwriter

Links

Gallery


Some thoughts

AsciiWriter is a Python library that can be used to generate plain text graphics and lay outs. The tool is embedded in a network of practices, scripts and events around OSP and Varia, in which plain text has been used to generate visuals and publications, such as the Data Workers, an exhibition catalog for Algolit (March 2019), a plaintext poster workshop at the Open Design Course at KASK (September 2019), Plaintext Partyline at Varia (April 2021) and a Peer-reviewed Newspaper made with asciiWriter (summer 2021).

My interest in plain text as a file format and environment points to a engaged mode of computational meaning making. Plain text, with the X-Y axes as rigid constraints, embodies a monotone and spacial strictness of a monospace environment. Plain text can be an intimate space, with its manual and direct possibilities to intervene in the drawing or lay out that you're making.

Matrix - matriz in Spanish, matris in Tagalog, the womb The intimate nature of an organization is visible in the way it holds information on its spreadsheets. To hold information womblike, allowing nutritive forces to find their way to what is being gestated. X, Y, axes to determine sex and maybe gender chromosomally. When an X-Y matrix is populated with information linearly, the possibility of curvature arises, of reading data on multiple hair-pin turns, down a column, through a row, and inter-lineally in other directions. It is this turning of attention on multiple tangent points that allows an anti-linear (?) reading. More than anti-linear, I would say it's hyperlinear. The greater the multiplicity of data points to turn on, the higher the possibility of representing fluid life forms. Am thinking about a drawing exercise I saw today on a meme account. It was an exercise from 1910. The instructions were to draw a cat using only angular lines.

Clara Balaguer, https://vvvvvvaria.org/plaintext-partyline/

Turning AsciiWriter into an pip-installable Python library was actually also an exploration in itself, both Gijs de Heij and myself had never done that before, and we were curious to give it a try. What does it mean to turn a bunch of scripts that are stored in git repo's here and there into something that is installable Python library? Would other people use and transform it? Do we need to maintain this library?

During the radio conversation Standards and work arounds, with Open Source Publishing (OSP), initiated by Simon Browne and myself in the context of the Publishing Partyline, the notion of tools was central to understanding what impact tool-making has on a design or publishing practice. What is the difference between a tool and a set of scripts? Is the gesture of turning something into a tool a gesture of claiming ownership and authorship? When we discussed the html2print project of OSP during the radio conversation, Alex, Gijs, Doriane and Amélie explained how the project first emerged as an experiment, but then grew into an approach and ecosystem. Something like a boilerplate that invites you to adapt it, a collection of hacks, or a tool chain. They preferred to look at it as a collection of practices, rather than a solid/fixed tool.


Use asciiWriter

(Psst: this is incomplete documentation...)

marks

With marks you can specify what kind of text you are passing on to asciiWriter.

random()

sentence(str)

text(str)

single(str)

space(str)

patterns

You can draw patterns with the following functions.

diagonal(x, y, width, height, mark, blank)

Draw a diagnal line from top left to bottom right.

cross(x, y, width, height, mark, blank)

Draw two diagonals.

horizontal(y)

Draw horizontal line at given Y position.

vertical(x)

Draw a vertical line at given X position.

sinus_vertical(period=0.2, amplitude=0.5, offset_t=0, offset=0)

Draw a sinus shape vertically.

sinus_horizontal(period=0.2, amplitude=0.5, offset_t=0, offset=0)

Draw a sinus shape horizontally.

image(path, threshold=128)

Put marks based on a mask. Requires Pillow to be installed.

$ pip3 install pillow

text

utils

wrap_single_line