topmark.presentation.text.pipeline ¶
TEXT pipeline renderers for the TopMark CLI.
This module renders human-facing TEXT output for pipeline-oriented commands
such as topmark check and topmark strip.
TEXT output is console-oriented: it may use verbosity_level for progressive
disclosure, styled for ANSI-capable semantic styling, and compact hints that
refer to -v / -vv. Markdown and machine-readable output are rendered by separate
presentation and machine-readable output layers.
Notes
- ANSI styling primitives (for example, conditional colorization) live in
topmark.cli.presentation. - Markdown pipeline output is implemented in
topmark.presentation.markdown.pipeline. - Machine-readable output is handled via domain machine serializers.
render_pipeline_diffs_text ¶
Render standalone TEXT diff payload output for a pipeline command.
This output is separate from the human per-file report. Commands use it for
--diff stdout payloads while routing guidance and summaries through the
regular human report path. Unlike report-embedded diff sections, this
payload intentionally omits human-facing section fences so STDOUT remains a
patch-like stream.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
Sequence[ProcessingResult]
|
Durable processing results to inspect for retained diffs. |
required |
styled
|
bool
|
Whether ANSI-capable styling is enabled. |
required |
show_line_numbers
|
bool
|
Whether to prepend line numbers. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
TEXT diff payload output, or an empty string when no diff is available. |
Source code in src/topmark/presentation/text/pipeline.py
render_pipeline_output_text ¶
Render human-facing TEXT output for a pipeline command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report
|
PipelineCommandHumanReport
|
Prepared human report for the pipeline command. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Rendered TEXT output for the prepared pipeline report. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If an invalid pipeline kind was selected. |
Source code in src/topmark/presentation/text/pipeline.py
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 | |
render_pipeline_apply_summary_text ¶
Render the apply-summary footer for TEXT output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command_path
|
str
|
Command path, such as |
required |
written
|
int
|
Number of files written. |
required |
failed
|
int
|
Number of files that failed to write. |
required |
styled
|
bool
|
Whether ANSI-capable styling is enabled. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Rendered TEXT footer. |