fediverse_pasture_inputs.types¶
fediverse_pasture_inputs.types ¶
SupportFunction
module-attribute
¶
Type of function to assigned in support result. Examples
See fediverse_pasture_inputs.types.Support.for_app for details.
Details
dataclass
¶
Configuration for the details table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
dict[str, str]
|
The title line per app |
required |
extractor
|
Dict[str, Callable[list, List[str]]]
|
map of application / activity to the corresponding display in the details table |
required |
frontmatter
|
str | None
|
optional frontmatter to display before the details |
None
|
Source code in fediverse_pasture_inputs/types.py
InputData
dataclass
¶
Dataclass describing an input for an object support table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
Title of the support table |
required |
frontmatter
|
str
|
Frontmatter describing why the support table exists |
required |
examples
|
List[Dict]
|
List of dictionaries being added to the object |
required |
filename
|
str
|
Name of generated markdown file |
required |
group
|
str
|
The group the example is to be displayed in |
required |
details
|
Details | None
|
How the details table will be generated |
None
|
support
|
Support | None
|
If set, how the support table should be build |
None
|
Source code in fediverse_pasture_inputs/types.py
Support
dataclass
¶
Configuration for the support table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
The title of the support |
required |
result
|
dict[str, Union[Callable[list, str], Callable[list, str]]]
|
Mapping betweeen applications and the support result |
required |
Source code in fediverse_pasture_inputs/types.py
for_app ¶
for_app(entry: Entry, app: str)
Returns the support result for the entry and app