Skip to main content

Module plain_text_post

Module plain_text_post 

Source
Expand description

§Plain-text → hashiverse HTML conversion

Hashiverse posts are stored and transmitted as a constrained subset of HTML (so that rich posts from the web client, API clients, and plain-text API clients are all the same format on the wire). This module provides the one-way convenience path for callers that have nothing but a string of text — mainly the Python client, plain-text API integrations, and quick CLI posts.

The output is the same HTML shape produced by the Tiptap editor in the web client: HTML-escaped body, #hashtag tokens rewritten as <hashtag> elements, @<64-hex-id> mentions rewritten as <mention> elements, and literal newlines turned into <br>. submit_post() then parses the result into the canonical on-wire representation.

Functions§

convert_text_to_hashiverse_html
Converts a plain-text post into well-formed HTML that submit_post() can parse.