sextile.content.blocks

The semantic shape of a document, between its source and a screen.

Deliberately structural rather than typographic. On forty columns, colour earns its keep telling a quotation from a code listing from the author’s own words; it earns nothing rendering an italic, so emphasis is dropped and structure is kept.

A paragraph holds lines rather than one string because a single line break and a paragraph break are different things that can arrive looking the same, and spending a blank row on every break would be ruinous on a twenty-four row screen.

class sextile.content.blocks.Attachment(name)[source]

Bases: object

A file attached to the document, named but not retrievable.

Parameters:

name (str)

class sextile.content.blocks.Code(lines)[source]

Bases: object

A listing, whose spacing is significant and must not be reflowed.

Parameters:

lines (tuple[str, ...])

class sextile.content.blocks.Document(blocks, links=())[source]

Bases: object

A body of content, ready to be laid out.

Parameters:
class sextile.content.blocks.Image(description)[source]

Bases: object

A picture, which a viewdata terminal can only announce.

Parameters:

description (str)

Bases: object

A link, numbered so the text can refer to it and the frame can list it.

Parameters:
class sextile.content.blocks.ListItem(text)[source]

Bases: object

One item of a bulleted or numbered list.

Parameters:

text (str)

class sextile.content.blocks.Paragraph(lines)[source]

Bases: object

Running text, already broken at the author’s own line breaks.

Parameters:

lines (tuple[str, ...])

class sextile.content.blocks.Quote(blocks)[source]

Bases: object

Words quoted from elsewhere, which may themselves quote.

Parameters:

blocks (tuple[Paragraph | Quote | Code | ListItem | Image | Attachment, ...])