dootle.mastodon.actions

See EOF for license/metadata/notes as applicable

Classes

MastodonSetup

Default Mastodon Setup, using secrets from doot.locs.mastodon_secrets

MastodonPost

Default Mastodon Poster

Module Contents

class dootle.mastodon.actions.MastodonSetup

Default Mastodon Setup, using secrets from doot.locs.mastodon_secrets loads the secrets as a chainguard, and accesses mastodon.access_token and mastodon.url ensures thers an “image_temp” location

_instance: ClassVar[jgdv.Maybe[mastodon.Mastodon]] = None
class dootle.mastodon.actions.MastodonPost

Default Mastodon Poster

_post_text(_instance, text) bool
Return type:

bool

_post_image(
_instance,
text,
_image_path,
_image_desc,
) bool
Return type:

bool

_handle_resolution(task) None
Return type:

None

_get_resolution(filepath: pathlib.Path) str
Parameters:

filepath (pathlib.Path)

Return type:

str

_maybe_compress_file(task) dict | bool
Return type:

dict | bool