💬 The social web translator
as1
:
get_owner
bug fix for post
, update
, delete
activities.activity_changed
: add new inReplyTo
kwarg.is_public
: add new unlisted
kwarg.as2
:
to_as1
: bug fix, preserve objectType: featured
for banner/header images even when mediaType
is also set.is_public
: add new unlisted
kwarg.from_as1
:
icon
field, prefer image types that are allowed by Mastodon.stop-following
with string object
id.atom
:
extract_entries
function.activity_to_atom
: default actor/author name to username.atom_to_activities
: support top-level entry
element as well as feed
.atom_to_*
:
object.author
objectType
to article
/note
and verb
to post
link rel=self
/alternate
to url
displayName
in objects instead of title
link
without rel
as self link.entry.author
doesn't have id or url, default them to feed author's.bluesky
:
create
and preview
.record
and object
types in from_as1
and to_as1
. Use to_as1
's type
kwarg and from_as1
's out_type
kwarg to disambiguate.Bluesky.post_id
.blob_to_url
function.as1_to_profile
, switch from_as1
to return $type: app.bsky.actor.profile
.summary
and content
to plain text.Bluesky.user_to_actor
, Bluesky.get_actor
.at_uri_to_web_url
: support lists.web_url_to_at_uri
: convert profile URLs like https://bsky.app/profile/snarfed.org
to profile record URIs (at://snarfed.org/app.bsky.actor.profile/self
) instead of repo URIs (at://snarfed.org
).from_as1_to_strong_ref
.:
s in record keys (atproto#2224).to_as1
:
getBlob
URLs.uri
kwarg.handle
to username
, add new repo_handle
kwarg.app.bsky.feed.repost
, app.bsky.graph.defs#listView
, app.bsky.feed.defs#blockedPost
.actor
/author
based on repo_did
.url
field: include custom handles, only use repo_did/handle
for app.bsky.actor.profile
.!no-unauthenticated
label on profiles to AS1 @unlisted
audience target (bridgy-fed#828).from_as1
:
out_type
kwarg to specify desired output type, eg app.bsky.actor.profile
vs app.bsky.actor.defs#profileViewBasic
vs app.bsky.actor.defs#profileView
.blobs
kwarg to provide blob objects to use for image URLs.client
kwarg to fetch and populate CIDs.parent
as root
in replies. (Technically wrong in cases where the parent isn't the root, but we don't actually know the root. 🤷)image
field.url
field./
from rel-me verified links on Mastodon etc.attributedTo
to singular if it has only one element.name
isn't set, fall back to preferredUsername
or infer Webfinger handle from id
or url
.url
field (bridgy#1640).bsky.app
inReplyTo
URLs to at://
URIs.datetime
conversion to match the ATProto recommended format.facebook
:
Facebook.fql_stream_to_post
. Facebook turned down FQL in 2016.
github
:
displayName
in objects instead of title
.mastodon
:
get_activities
bug fix: use query params for /api/v1/notifications
API call, not JSON body.error
JSON field (eg from Sharkey) to 400/401 exceptions.media_attachments.remote_url
when available since it may be more long-lived than url
for remote statuses (bridgy#1675).microformats2
:
object_to_json
bug fix: handle singular inReplyTo
.json_to_object
bug fix: handle list-valued location
.nostr:
get_*
: return partial results when the websocket connection is closed prematurely.to_as1
: handle invalid NIP05 values (eg {}
)rss
:
to_activities
:
objectType: note
if title
isn't set or is a prefix (possibly ellipsized) of content
/description
.media:content
tags (#674).Source
:
postprocess_activity/object
: add mentions
kwarg to convert @-mentions in HTML links to mention
tags.Nostr, Bluesky get_activities
, lots of improvements in as2
and microformats2
, and more!
REST API breaking changes:
Twitter is dead, at least in the REST API.
Non-breaking changes:
nostr
module!as1
:
get_owner
, targets
.accept
, reject
, stop-following
to VERBS_WITH_OBJECT
and remove repost
, it's not an AS1 verb.url
field list values (even though it's invalid AS1).as2
:
to_as1
:
Video
handling: support Link
objects in url
, extract stream URLs and types from link tag
s.latitude
and longitude
to float, raise ValueError
on failure.image
as well as attachments
(bridgy-fed#429).value
s.mediaType
in attachment
and tags
.TYPES_WITH_OBJECT
constant.get_urls
, address
functions.Content-Type
compatibility with application/ld+json; profile="https://www.w3.org/ns/activitystreams"
.Undo
activities with bare string id object
s.PropertyValue
attachments on actors to include full URL in anchro text to be compatible with Mastodon's profile link verification.atom
:
activities_to_atom
etc:
content
from XHTML to HTML inside CDATA to support non-XHTML input content (bridgy-fed#624.image
values.type="application/atom+xml"
from rel="self"
link
in entry
.objectType: comment
attachments.<a>
element for tags.activity_to_atom
/activities_to_atom
for dict-valued url
fields.objectType: service
attachments, eg Bluesky custom feeds.bluesky
:
Bluesky
API class, including get_activities
.app.bsky
/com.atproto
lexicons, use lexrpc's instead.web_url_to_at_uri
function.from_as1
: handle link tags without start/end indices.to_as1
:
type
kwarg.did
into actor id
.app.bsky.feed.defs#generatorView
.as1_to_profile
.subject
in app.bsky.graph.follow
is followee, not follower. (That field is badly named!)jsonfeed
:
activities_to_jsonfeed
:
image
and stream
.author
.mastodon
:
status_to_object
: add/fix alt text handling for images.microformats2
:
json_to_html
:
json_to_object
:
published
and updated
timestamps.object_to_json
:
image
values.published
and updated
timestamps.replies
and shares
(usually from AS2.)objectType: service
attachments, eg Bluesky custom feeds, in JSON and HTML output.rss
:
from_activities
: handle bare string id author
.as2
:
object
, inReplyTo
, etc values as ids, convert them to bare strings or id
instead of url
.microformats2
:
in-reply-to
, repost-of
, like-of
etc values to AS1 bare strings or id
s instead of url
s.bluesky
module for Bluesky/AT Protocol!as1
:
organization
object type and ACTOR_TYPES
constant (based on AS2).get_ids
, get_object
, and get_objects
functions.activity_changed
: ignore inReplyTo.author
(snarfed/bridgy#1338)as2
:
stop-following
and AS2 Undo
Follow
.Accept
and Reject
for follows as well as event RSVPs.Question
(ie poll), Organization
, and Delete
object types.to
/cc
to/from AS1 to
for public and unlisted.type: Document
video attachments like Mastodon emits.from_as1
: bug fix for image objects with url
and value
fields (for alt text).from_as1
: bug fix, handle bare string URL image
values.from_as1
: convert urls.displayName
to attachment.name
(bridgy-fed#331).from_as1
: preserve inReplyTo
object values as objects, inline single-element lists down down to just single element.to_as1
: use objectType: featured
for first image in image
field.to_as1
: populate actor
into object.author
for Update
s as well as Create
s.to_as1
: convert Mastodon profile metadata PropertyValue
attachments to url
composite objects with displayName
.to
and cc
values when converting both directions.atom
:
image
field to Atom.published
and updated
in entries with objects, eg likes, reposts, RSVPs, bookmarks. Thanks @gregorlove! (#480)activity/ies_to_atom
when object
is present and empty.objectType
in the to
field.flickr
:
get_activities
: add support for the count
kwarg.github
:
get_activities
: add support for the count
kwarg.jsonfeed
:
white-space: pre
CSS to converting newlines to <br>
s because some feed readers follow it strictly and don't even line wrap (#456).mastodon
:
microformats2
:
json_to_object
: drop backward compatibility support for like
and repost
properties. Background discussion.
json_to_object
: add new rel_urls
kwarg to allow attaching displayName
s to urls
based on HTML text or title
attribute (bridgy-fed#331).json_to_activities
function.hcard_to_html
/maybe_linked_name
: when name
is missing, use pretty URL as visible text.h-card
org
property.json_to_object
: handle composite rsvp
property value.json_to_object
: bug fix when fetch_mf2
is True, handle when we run the authorship algorithm and fetch an author URL that has a u-photo
with alt
.rss
:
from_activities
: fix item ordering to match input activities.get_activities
cache
kwarg's support for App Engine memcache interface. It's now only used as a plain dict
. get_activities
will now make many small modifications, so if you pass an object that implements those as API calls, you'll probably want to batch those separately.create
/preview
: support the AS1 favorite
verb as well as like
. (bridgy#1345)id
(instead of url
) to Atom id
.get_actor
.create
/preview
: allow non-Mastodon replies, ie activities that include inReplyTo
URLs even if none of them point to a toot. (bridgy#1321)requests.HTTPError
with response.status_code
502 instead of JSONDecodeError
on non-JSON responses. This is synthetic, but more helpful for error handling.object_to_json
and related functions: handle all escaped HTML entities, not just &
<
>
.microformats2.prefix_image_urls
and prefix_video_urls
into a new as1.prefix_urls
function.itunes:category
. It has to be one of Apple's explicit categories, which we aren't prepared to validate, so don't try.url
and urls
from AS1 into multi-valued AS2 url
field.Source
class to a new as1
module: object_type
, merge_by_id
, is_public
, add_rsvps_to_event
, get_rsvps_from_event
, activity_changed
, append_in_reply_to
, actor_name
, original_post_discovery
.as1.original_post_discovery
: remove deprecated cache
kwarg.icon
and image
are singly valued, not multiply valued.is_public
method and PUBLIC_AUDIENCE
constant."objectType": "featured"
first in the image
field when converting from AS1, last in the icon
field. This matches the ActivityPub (Mastodon) convention of using icon
for profile pictures and image
for header images.url
values into new PropertyValue
attachments on Person
objects; these end up in Mastodon's "profile metadata" link fields.to_as1
: if an attachment's mediaType
is image/...
, override objectType
and set it to image
.data-ft
attribute and _ft_
query param more often instead of story_fbid
, which is now an opaque token that changes regularly. (facebook-atom#27)Instagram.scraped_json_to_activities
method.create
and preview
: convert profile URLs to @-mentions, eg https://github.com/snarfed
to @snarfed
(bridgy#1090).
get_activities
with activity_id
now supports fetch_replies
and fetch_likes
.cache
support to get_activities
./scraped
endpoint that accepts POST
requests with silo HTML as input. Currently only supports Instagram. Requires site=instagram
, output=...
(any supported output format), and HTML as either raw request body or MIME multipart encoded file in the input
parameter.extra
and body_class
kwargs to activities_to_html
.u-featured
images to AS1, add new non-standard "objectType": "featured"
field to distinguish them from u-photo
.p-note
to AS1 summary
.image
attachments to photo
.Source.original_post_discovery
: add new max_redirect_fetches
keyword arg.include_shares
kwarg to get_activities
, implemented for Twitter and Mastodon. Defaults to True
. If False
, shares (retweets in Twitter, boosts in Mastodon) will be discarded and not returned. Also add a corresponding shares
query param to the REST API.rss.to_activities
function.user
object, add new fetch for comments.Instagram.merge_scraped_comments()
.type
isn't a string.get_activities()
to fetch posts by the current user or a user specified with user_id
.log_html
kwarg to get_activities
; defaults to False.items.author
element.Source.original_post_discovery
: add new include_reserved_hosts
kwarg, defaults to True
.get_activities()
with fetch_mentions=True
: handle notifications with status: null
. Maybe happens when a status is deleted?create
/preview_create
: support bookmarks. (Nothing special happens with them; their content
is posted as a normal toot.)image.displayName
as visible text in HTML, since it's already in the <img>
's alt
attribute.bookmark-of
support.prefix_image_urls()
function.content
in AS1/2 objects.json_to_object
bug fix for composite bookmark-of
properties.create
/preview
: support large videos via async upload. We now pass media_category=tweet_video
to the chunked upload INIT
stage, and then make blocking STATUS
calls until the video is finished processing. (bridgy#1043)create
/preview
: allow bookmarks. (bridgy#1045)create
/preview
: allow non-Twitter replies, ie activities that include inReplyTo
URLs even if none of them point to a tweet. (bridgy#1063)get_activities
: support list ids as well as slugs.get_activities()
: raise ValueError
on invalid user_id
.scraped_to_activities()
, scraped_to_activity()
, and merge_scraped_reactions()
methods.summary
element (#157).Link
HTTP headers (eg rel=self
, rel=header
).get_comment()
: skip fetching comments from API if activity
kwarg is provided and contains the requested comment.#discussion_r...
fragments).aria-hidden="true"
to empty links (bridgy#947).&
, <
, and >
characters in bare mf2 content
properties (aaronpk/XRay#102).json_to_object()
: convert nickname
to username
.content_html
and content_text
are incorrectly lists instead of strings.limit
param for compatibility with Pleroma (bridgy#977).create()
: handle API errors and return the error message in the CreationResult
(bridgy#921).photo.displayName
so that it gets all the way into microformats2 JSON and HTML (#183).post_id()
.to_as1()
: for Create
activities, include the activity actor's data in the object's author (snarfed/bridgy-fed#75).to_as1()
: convert preferredUsername
to username
.from_as1()
: convert username
to preferredUsername
.from_as1()
: bug fix, make context
kwarg actually work.Breaking changes:
Non-breaking changes:
get_actor()
with user_id
.get_activites()
etc (#183).itunes:image
, itunes:author
, and itunes:category
.title
element (#177). Background.
hfeed
correctly.article
or mention
tags in items with enclosures.hfeed
correctly.HEAD
support.input=html
. If a fragment is provided, only that specific element is extracted and converted. (#185)<code>
tags instead of converting them to `s so that GitHub renders HTML entities like >
inside them instead of leaving them escaped. Background.
context
fields.html_to_activities()
: limit to h-entry
, h-event
, and h-cite
items (#192).cache
kwarg to Source.original_post_discovery()
now has no effect. webutil.util.follow_redirects()
has its own built in caching now.json
module to ujson
to speed up JSON parsing and encoding.duration
and size
support to ActivityStreams 1 and 2, RSS, and microformats2 HTML and JSON. microformats2 support is still emerging for both. Both integer seconds and ISO 8601 string durations are supported for duration
. Integer bytes is used for size
everywhere. microformats2 HTML also includes human-readable strings, eg 5.1 MB
. (#169)[preview]_create()
: detect attempts to upload images over 5MB and return an error.get_activities(scrape=True)
for scraping HTML from m.facebook.com. Requires c_user
and xs
cookies from a logged in session (snarfed/bridgy#886).<description>
element contents in CDATA
sections.<description>
with HTML <img>
tags (#175).from_activities()
bug fix: don't crash when converting multiple attachments to enclosures in a single item. (RSS only supports one enclosure per item, so we now only include the first, and log a warning if the activity has more.)Mention
tags to AS1 objectType
mention
(non-standard) and vice versa (snarfed/bridgy-fed#46).u-category
mf2.edge_media_to_parent_comment
field (#164).white-space: pre
CSS in HTML output.photo.php
as username in post URLs.white-space: pre
CSS back to converting newlines to <br>
s because some feed readers (eg NewsBlur) follow it too strictly and don't even line wrap.