API
A simple finger to Gemtext converter.
AvailableServicesFilter
AvailableServicesFilter(peekable_lines: int = 20)
Bases: FingerFilter
Filter for Finger available services responses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
The number of lines to peek at when deciding the content type. |
20
|
can_likely_convert
can_likely_convert(finger_content: str) -> bool
to_gemtext
to_gemtext(finger_content: str) -> str
FingerFilter
FingerFilter(peekable_lines: int = 10)
Bases: ABC
Base class for finger filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
The number of lines to peek at when deciding the content type. |
10
|
can_likely_convert
abstractmethod
can_likely_convert(finger_content: str) -> bool
peekable_lines
The number of lines to peek at when deciding the content type.
to_gemtext
abstractmethod
to_gemtext(finger_content: str) -> str
UserListFilter
UserListFilter(peekable_lines: int = 10)
Bases: FingerFilter
Filter for Finger user list responses.
can_likely_convert
can_likely_convert(finger_content: str) -> bool
to_gemtext
to_gemtext(finger_content: str) -> str
finger_to_gemtext
finger_to_gemtext(
finger_content: str,
additional_filters: Iterable[type[FingerFilter]]
| None = None,
) -> str