bovine.utils
- class bovine.utils.JrdData(subject: str | None = None, links: list[bovine.utils.JrdLink] = <factory>)[source]
Dataclass representing a JRD Object
See RFC 7033
- class bovine.utils.JrdLink(rel: str | None = None, href: str | None = None, type: str | None = None)[source]
Dataclass representing a JRD link
See RFC 7033
- bovine.utils.activity_pub_object_id_from_html_body(body: str) str | None [source]
Determines the object identifier from the html body by parsing it and looking for link tags with rel=”alternate” and type application/activity+json
- bovine.utils.now_isoformat() str [source]
Returns now in Isoformat, e.g. “2023-05-31T18:11:35Z”, to be used as the value of published
- bovine.utils.parse_fediverse_handle(account: str) Tuple[str, str | None] [source]
Splits fediverse handle in name and domain Supported forms are:
user@domain -> (user, domain)
@user@domain -> (user, domain)
acct:user@domain -> (user, domain)