Skip to content

Commit 72601fd

Browse files
authored
Merge pull request #168 from pharmaverse/mkdocstrings
Updated API reference docs
2 parents 265789e + 27abba1 commit 72601fd

File tree

11 files changed

+145
-63
lines changed

11 files changed

+145
-63
lines changed

docs/reference/assemble.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
# Assemble
1+
# Assembly helpers
22

3-
::: rtflite.assemble
3+
Utilities for combining existing RTF or DOCX outputs.
4+
5+
::: rtflite.assemble.assemble_rtf
6+
options:
7+
show_root_heading: false
8+
show_source: false
9+
10+
::: rtflite.assemble.assemble_docx
11+
options:
12+
show_root_heading: false
13+
show_source: false
14+
15+
::: rtflite.assemble.concatenate_docx
416
options:
5-
members:
6-
- assemble_rtf
7-
- assemble_docx
8-
- concatenate_docx
9-
show_root_heading: true
17+
show_root_heading: false
1018
show_source: false

docs/reference/convert.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Convert
1+
# Format conversion
22

3-
::: rtflite.convert
3+
Convert generated RTF files to other document formats using LibreOffice.
4+
5+
::: rtflite.convert.LibreOfficeConverter
46
options:
5-
members:
6-
- LibreOfficeConverter
7-
show_root_heading: true
7+
show_root_heading: false
88
show_source: false

docs/reference/encoding.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Encoding pipeline
2+
3+
Encoding orchestrators that drive the strategy-based pagination and rendering flow.
4+
5+
## RTFEncodingEngine
6+
7+
::: rtflite.encoding.RTFEncodingEngine
8+
options:
9+
show_root_heading: false
10+
show_source: false
11+
12+
## UnifiedRTFEncoder
13+
14+
::: rtflite.encoding.UnifiedRTFEncoder
15+
options:
16+
show_root_heading: false
17+
show_source: false

docs/reference/low-level.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# Low-level API
1+
# Core utilities
22

3-
Lower-level components and utilities for advanced users who need fine-grained control.
3+
Low-level components for configuring defaults and working with assets.
44

5-
## Configuration
6-
7-
Core configuration and constants.
5+
## Configuration & constants
86

97
::: rtflite.core.RTFConfiguration
108
options:
119
show_root_heading: false
1210
show_source: false
1311

14-
::: rtflite.core.RTFConstants
12+
::: rtflite.core.RTFDefaults
1513
options:
1614
show_root_heading: false
1715
show_source: false
1816

19-
## Figure Utilities
17+
::: rtflite.core.RTFConstants
18+
options:
19+
show_root_heading: false
20+
show_source: false
2021

21-
Utilities for reading and processing figures.
22+
## Figure utilities
2223

2324
::: rtflite.figure.rtf_read_figure
2425
options:

docs/reference/page-layout.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Page Layout Components
1+
# Page layout components
22

3-
Components for defining page structure, headers, footers, and overall document layout.
3+
Components for defining page structure, headers, footers, and supporting text blocks.
44

55
## RTFPage
66

7-
Defines page dimensions, margins, and layout settings.
7+
Defines page dimensions, margins, orientation, and pagination settings.
88

99
::: rtflite.input.RTFPage
1010
options:
@@ -13,16 +13,16 @@ Defines page dimensions, margins, and layout settings.
1313

1414
## RTFPageHeader
1515

16-
Creates headers that appear at the top of pages.
16+
Header text that appears at the top of pages. Supports field codes for page numbering.
1717

1818
::: rtflite.input.RTFPageHeader
1919
options:
2020
show_root_heading: false
2121
show_source: false
2222

23-
## RTFPageFooter
23+
## RTFPageFooter
2424

25-
Creates footers that appear at the bottom of pages.
25+
Footer text that appears at the bottom of pages.
2626

2727
::: rtflite.input.RTFPageFooter
2828
options:
@@ -31,16 +31,25 @@ Creates footers that appear at the bottom of pages.
3131

3232
## RTFTitle
3333

34-
Defines document and table titles.
34+
Document and table titles displayed above the main content.
3535

3636
::: rtflite.input.RTFTitle
3737
options:
3838
show_root_heading: false
3939
show_source: false
4040

41+
## RTFSubline
42+
43+
Subject lines that sit beneath the title and above the table body.
44+
45+
::: rtflite.input.RTFSubline
46+
options:
47+
show_root_heading: false
48+
show_source: false
49+
4150
## RTFFootnote
4251

43-
Creates footnotes for tables and documents.
52+
Footnote text displayed after the table content.
4453

4554
::: rtflite.input.RTFFootnote
4655
options:
@@ -49,9 +58,9 @@ Creates footnotes for tables and documents.
4958

5059
## RTFSource
5160

52-
Adds source information to documents.
61+
Source information displayed at the bottom of the document.
5362

5463
::: rtflite.input.RTFSource
5564
options:
5665
show_root_heading: false
57-
show_source: false
66+
show_source: false

docs/reference/pagination.md

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Pagination
22

3-
Advanced pagination features for multi-page documents.
3+
Metadata-driven pagination utilities and strategies used by the unified encoder.
44

55
## RTFPagination
66

7-
Main pagination controller for handling page breaks and content distribution.
7+
Core pagination settings used to calculate available space on each page.
88

99
::: rtflite.pagination.RTFPagination
1010
options:
@@ -13,9 +13,55 @@ Main pagination controller for handling page breaks and content distribution.
1313

1414
## PageBreakCalculator
1515

16-
Calculates optimal page break positions.
16+
Calculates row metadata, page assignments, and optimal break points.
1717

1818
::: rtflite.pagination.PageBreakCalculator
1919
options:
2020
show_root_heading: false
21-
show_source: false
21+
show_source: false
22+
23+
## Pagination contexts and registry
24+
25+
::: rtflite.pagination.PaginationContext
26+
options:
27+
show_root_heading: false
28+
show_source: false
29+
30+
::: rtflite.pagination.PageContext
31+
options:
32+
show_root_heading: false
33+
show_source: false
34+
35+
::: rtflite.pagination.StrategyRegistry
36+
options:
37+
show_root_heading: false
38+
show_source: false
39+
40+
::: rtflite.pagination.PaginationStrategy
41+
options:
42+
show_root_heading: false
43+
show_source: false
44+
45+
## Built-in strategies
46+
47+
::: rtflite.pagination.strategies.defaults.DefaultPaginationStrategy
48+
options:
49+
show_root_heading: false
50+
show_source: false
51+
52+
::: rtflite.pagination.strategies.grouping.PageByStrategy
53+
options:
54+
show_root_heading: false
55+
show_source: false
56+
57+
::: rtflite.pagination.strategies.grouping.SublineStrategy
58+
options:
59+
show_root_heading: false
60+
show_source: false
61+
62+
## Page feature processing
63+
64+
::: rtflite.pagination.processor.PageFeatureProcessor
65+
options:
66+
show_root_heading: false
67+
show_source: false

docs/reference/rtf-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RTFDocument
22

3-
The `RTFDocument` class is the main entry point for creating RTF documents with rtflite. It orchestrates all components to generate properly formatted RTF output.
3+
Main entry point for creating complete RTF documents using the unified encoding pipeline. Use this class to combine pages, headers/footers, titles, tables, and figures into production-ready output.
44

55
::: rtflite.encode.RTFDocument
66
options:
77
show_root_heading: false
8-
show_source: false
8+
show_source: false

docs/reference/strwidth.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# String width
22

3-
::: rtflite.strwidth
3+
Measure string widths using the metric-compatible fonts bundled with rtflite.
4+
5+
::: rtflite.strwidth.get_string_width
46
options:
5-
members:
6-
- get_string_width
7-
show_root_heading: true
7+
show_root_heading: false
88
show_source: false

docs/reference/tables.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Table Components
1+
# Table components
22

3-
Components for creating and formatting tables in RTF documents.
3+
Components for creating table structures, spanning rows, and embedded figures.
44

55
## RTFBody
66

7-
Defines the main table body with data and formatting options.
7+
Configures table bodies, including grouping, spanning rows, and metadata-driven pagination.
88

99
::: rtflite.input.RTFBody
1010
options:
@@ -13,7 +13,7 @@ Defines the main table body with data and formatting options.
1313

1414
## RTFColumnHeader
1515

16-
Creates column headers for tables.
16+
Column header definitions. Supports multi-row headers via nested sequences.
1717

1818
::: rtflite.input.RTFColumnHeader
1919
options:
@@ -22,16 +22,16 @@ Creates column headers for tables.
2222

2323
## RTFFigure
2424

25-
Embeds figures and images in RTF documents.
25+
Embeds figures and images alongside or in place of tabular content.
2626

2727
::: rtflite.input.RTFFigure
2828
options:
2929
show_root_heading: false
3030
show_source: false
3131

32-
## Row Components
32+
## Row components
3333

34-
Lower-level components for row construction.
34+
Lower-level components for constructing rows and cells manually when needed.
3535

3636
### Row
3737

@@ -52,4 +52,4 @@ Lower-level components for row construction.
5252
::: rtflite.row.Border
5353
options:
5454
show_root_heading: false
55-
show_source: false
55+
show_source: false

docs/reference/text-formatting.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
# Text & Formatting
1+
# Text & formatting
22

3-
Components and utilities for text styling and formatting in RTF documents.
3+
Base attribute models and utilities for styling text and table cells.
44

5-
## Text Attributes
5+
## Text attributes
66

7-
Base attributes for text formatting.
7+
Shared text styling options consumed by headers, footers, titles, and table cells.
88

99
::: rtflite.attributes.TextAttributes
1010
options:
1111
show_root_heading: false
1212
show_source: false
1313

14-
## Table Attributes
14+
## Table attributes
1515

16-
Attributes specific to table formatting.
16+
Table-specific attributes layered on top of text styling (borders, column widths, pagination flags).
1717

1818
::: rtflite.attributes.TableAttributes
1919
options:
2020
show_root_heading: false
2121
show_source: false
2222

23-
## Text Content
23+
## Broadcast value
2424

25-
Component for handling text content in cells.
25+
Utility for broadcasting scalar or vector values across table dimensions.
2626

27-
::: rtflite.row.TextContent
27+
::: rtflite.attributes.BroadcastValue
2828
options:
2929
show_root_heading: false
3030
show_source: false
3131

32-
## Broadcast Value
32+
## Text content
3333

34-
Utility for broadcasting values across rows and columns.
34+
Low-level text container used inside custom rows and cells.
3535

36-
::: rtflite.attributes.BroadcastValue
36+
::: rtflite.row.TextContent
3737
options:
3838
show_root_heading: false
39-
show_source: false
39+
show_source: false

0 commit comments

Comments
 (0)