topmark.presentation.text.utils¶
topmark / presentation / text / utils
Shared presentation utilities for TEXT.
This module provides helpers to render text fragments.
Scope: - Pure string rendering only (no I/O, no Click/Rich console usage). - Safe to import from any frontend (CLI, API tests, etc.).
The helpers here are intentionally small and composable; command-specific formatting belongs in the command's presentation module.
render_toml_text ¶
Render a TOML snippet with optional banner and BEGIN/END markers.
Used by config commands in the default (ANSI) output format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
Title line shown above the block when verbosity > 0. |
required |
toml_text
|
str
|
The TOML content to render. |
required |
verbosity_level
|
int
|
Effective verbosity; 0 disables banners. |
required |
styled
|
bool
|
Whether to render the TOML with styles. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Rendered TOML text as plain string. |