Skip to content

Releases: snarfed/granary

v2.2: ### Notable changes

02 Nov 15:55
8bae17c
Compare
Choose a tag to compare

Notable changes

  • Add Mastodon support!
  • Add Python 3.7 support, and improve overall Python 3 compatibility.
  • Update a number of dependencies.
  • Switch from Python's built in json module to ujson to speed up JSON parsing and encoding.
  • Add 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)
  • Twitter:
    • [preview]_create(): detect attempts to upload images over 5MB and return an error.
  • Facebook:
  • Atom:
    • Bug fix for de-duping images in attachments.
  • RSS:
    • Wrap all <description> element contents in CDATA sections.
    • Render images in <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.)

v2.1: ### Notable changes

06 Sep 05:10
7865904
Compare
Choose a tag to compare

Notable changes

  • Convert AS2 Mention tags to AS1 objectType mention (non-standard) and vice versa (snarfed/bridgy-fed#46).
  • Twitter:
    • Bug fix for large block list fetches that get rate limited after a few successful requests.
    • Handle HTTP 403 + error code 200 when fetching retweets for a protected or otherwise unavailable tweet (bridgy#688).
    • Demote @-mentions from person-tags to mentions. Specifically, this means they'll no longer get rendered with u-category mf2.
  • Instagram:
    • Disabled in the REST API entirely due to Instagram's aggressive rate limiting and blocking (bridgy#655).
    • Update scraping to handle replies in new edge_media_to_parent_comment field (#164).
    • Use cookie for all scraping HTTP requests, not just for likes.
  • microformats2:
    • Revise whitespace handling; use white-space: pre CSS in HTML output.
  • Facebook:
    • Bug fix: don't interpret photo.php as username in post URLs.
  • Atom:
    • Switch from 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.
  • RSS:
    • Default title to ellipsized content.

v2.0: ### Notable changes

01 Mar 15:32
4e4a1ca
Compare
Choose a tag to compare

Notable changes

Breaking change: drop Google+ since it shuts down in March. Notably, this removes the googleplus module.

v1.15: ### Notable changes

28 Feb 19:04
500c422
Compare
Choose a tag to compare

Warning: the next release, 2.0, will drop Google+ support and the googleplus module entirely, since Google+ is shutting down.

Notable changes

  • Add RSS 2.0 output! (#124)
  • All silos:
    • Switch users' primary URLs from web site to silo profile (#158).
  • GitHub:
  • Atom:
    • Bug fix for actors and attachments with multiple image URLs.
    • Bug fix for attachment author objects with no properties.
  • Google+:
  • Instagram:
  • Twitter:
    • Update max video upload size from 5MB to 512MB (#162).
  • /url: Return HTTP 400 when fetching the user's URL results in an infinite redirect.

v1.14: ### Notable changes

13 Nov 07:08
a82fda5
Compare
Choose a tag to compare

Notable changes

Add delete(). Currently includes Twitter and Flickr support.

  • Instagram:
    • Make extra HTTP fetch (with cookie) to get individual likes (snarfed/bridgy#840).
    • Update scraping logic to handle feed HTML changes.
    • Link @-mentions in comments as well as photo/video captions.
  • GitHub:
    • create/preview_create bug fixes for issues and comments on private repos.
    • Handle HTTP 410 Gone responses from REST API, eg when a repo has been deleted or issues for the repo disabled.
  • Twitter:
    • Add delete() and preview_delete() for deleting tweets.
  • Flickr:
    • Add delete() and preview_delete() for deleting photos.
  • microformats2:
    • Add follow-of support.
    • Only use quotation-of property for quote tweets, not URLs. (#155)
    • If a tag has startIndex/length, it gets linkified in the content, so don't also emit an mf2 child or HTML h-cite for it. (#155
  • Atom:
    • Encode &s in author URL and email address too. (Thanks sebsued!)
  • AS2:
    • Add Follow support.

v1.13: ### Notable changes

09 Aug 00:09
Compare
Choose a tag to compare

Notable changes

  • Twitter:
    • Support ISO 8601 formatted created_at timestamps, which the archive download uses, as well as RFC 2822 from the API.
    • create() and preview_create(): support RSVPs. Tweet them as normal tweets with the RSVP content. (snarfed/bridgy#818)
    • create() and preview_create(): support alt text for images, via AS1 displayName. (snarfed/bridgy#756).
  • Instagram:
    • Add global rate limiting lock for scraping. If a scraping HTTP request gets a 429 or 503 response, we refuse to make more requests for 5m, and instead short circuit and return the same error. This can be overridden with a new ignore_rate_limit kwarg to get_activities().
  • GitHub:
    • Add tag support to create/preview_create to add label(s) to existing issues (snarfed/bridgy#811).
    • Escape HTML characters (<, >, and &) in content in create() and preview_create() (snarfed/bridgy#810).
    • get_activities() and get_comment() now return ValueError instead of AssertionError on malformed activity_id and comment_id args, respectively.
    • get_activities() bug fix for issues/PRs with no body text.
    • Switch from GraphQL to REST API for creating comments and reactions, since GraphQL hits authorization errors on many org repos. (snarfed/bridgy#824)
    • Improve GraphQL support for comments and users.
  • Atom:
    • Shorten and ellipsize feed title when necessary (#144).
  • microformats2:

v1.12: ### Notable changes

24 Mar 23:14
Compare
Choose a tag to compare

Notable changes

  • Add Python 3 support! Granary now requires either Python 2.7+ or Python 3.3+.
  • Instagram:
    • Fix scraping profile pages.
  • Twitter:
    • Update character counting to handle Twitter change that now auto-links all ccTLDs. Background.
  • GitHub:
    • Bug fix for get_activities() with deleted issues and repos.
  • microformats2:
    • object_to_json(): convert tags to simple strings in the category property, not full nested objects like h-cards (#141).
    • Special case GitHub issues that are in-reply-to a repo or its /issues URL to be objectType issue.
    • Render simple string categories in HTML output.

This release is intentionally small and limited in scope to contain any impact of the Python 3 migration. It should be a noop for existing Python 2 users, and we've tested thoroughly, but I'm sure there are still bugs. Please file issues if you notice anything broken!

v1.11: ### Notable changes

09 Mar 17:15
Compare
Choose a tag to compare

Notable changes

  • Add GitHub!
    • get_activities() supports issues and pull requests, including comments and reactions. It's currently based on notifications, so it's best effort, not comprehensive, and only includes recently active issues/PRs.
    • create() and preview_create() support issues, comments, stars, and reactions.
  • Twitter:
    • Prefer MP4 and other video/... content types to HLS (.m3u8) etc. Background.
    • Prefer HTTPS URLs for media images.
    • get_activities(): Support @-prefixed usernames in user_id.
  • Facebook:
    • Support new recurring aka multi-instance events. create() and preview_create() now only support RSVPs to individual instances of multi-instance events, to match the Facebook API itself.
    • Try harder to find original (full) sized photo URLs, specifically _o.jpg files instead of _s.jpg.
    • create() bug fix for photo and image URLs with unicode characters.
    • Fixed bug where get_activities(user_id=...) included the authenticated user's own recent photos, albums, and news publishes.
  • Instagram:
    • Extract more user (author) data from scraped profile pages.
    • Fix home page feed scraping.
  • microformats2, Atom:
    • Add enclosures for image attachments.
    • Bug fixes for rendering image, video, and audio attachments inside shares and attachments. De-dupe images.
  • microformats2:
    • Handle simple string-only author properties.
    • Add fetch_mf2 kwarg to json_to_object() for fetching additional pages over HTTP to determine authorship.
    • Generate explicit blank p-name in HTML to prevent old flawed implied p-name handling #131.
    • Fix share verb handling in activity_to_json() and activities_to_html() #134.
    • Remember which content contains HTML, preserve newlines in it, and don't translate those newlines to <br>s (#130).
  • Atom:
    • Fix timezone bugs in updated and published.
  • JSON Feed:
    • Omit title from items if it's the same as the content. (Often caused by microformats2's implied p-name logic.)

v1.10: ### Notable changes

11 Dec 00:28
Compare
Choose a tag to compare

Notable changes

  • Moved web site and REST API to granary.io! granary-demo.appspot.com now 301 redirects.
  • Twitter:
  • Instagram:
    • Add cookie query param to REST API to allow scraping that logged in user's feed.
  • HTML (including Atom content):
    • Render image, video, and audio attachments more often and consistently.
    • Include microformats2 u-photo, u-video, and u-audio classes more often and consistently.
  • Atom:
    • Add atom_to_activities() for converting full feed documents.
    • Add to REST API and web UI.
  • JSON Feed:
    • Fix bug that omitted title in some cases (#122).

v1.9: ### Notable changes

27 Oct 05:09
Compare
Choose a tag to compare

Notable changes

  • Add ActivityStreams 2.0! New as2 module includes to_as1() and from_as1() functions. Currently supported: articles, notes, replies, likes, reposts, events, RSVPs, tags, attachments.
  • Atom:
    • Add new atom_to_activity() function for converting Atom to AS1.
    • Add email field to author, if provided.
  • JSON Feed:
    • Raise ValueError on bad (non-dict) input.
  • REST API:
    • Add as2 value for format and input. Revise existing ActivityStreams and microformats2 value names to as1, as1-xml, and mf2-json. Old values activitystreams, json, json-mf2, and xml are still accepted, but deprecated.