Skip to content

Commit

Permalink
release v6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Mar 22, 2023
1 parent 050e19f commit 26b708f
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 50 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ On the open source side, there are many related projects. [php-mf2-shim](https:/

Changelog
---
### 6.0 - unreleased
### 6.0 - 2023-03-22

_Breaking changes:_

Expand All @@ -290,7 +290,7 @@ _Breaking changes:_

_Non-breaking changes:_

* Add new `bluesky` module for [Bluesky](https://blueskyweb.org/)/[AT Protocol](https://atproto.com/).
* Add new `bluesky` module for [Bluesky](https://blueskyweb.org/)/[AT Protocol](https://atproto.com/)!
* `as1`:
* Add the `organization` object type and `ACTOR_TYPES` constant ([based on AS2](https://www.w3.org/TR/activitystreams-core/#actors)).
* Add new `get_ids`, `get_object`, and `get_objects` functions.
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
# built documents.
#
# The short X.Y version.
version = '5.0'
version = '6.0'
# The full version, including alpha/beta/rc tags.
release = '5.0'
release = '6.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
110 changes: 66 additions & 44 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ granary
-------

Granary is a library and REST API that fetches and converts between a
wide variety of data sources and formats:
wide variety of social data sources and formats:

- Facebook, Flickr, GitHub, Instagram, Mastodon, and Twitter native
APIs
- Instagram and Facebook scraped HTML
- `ActivityStreams <http://activitystrea.ms/>`__ 1.0 and 2.0 (JSON)
- `ActivityStreams <http://activitystrea.ms/>`__ 1.0 and 2.0 JSON,
including `ActivityPub <https://activitypub.rocks/>`__
- HTML and JSON with
`microformats2 <http://microformats.org/wiki/microformats2>`__
- `Atom <https://tools.ietf.org/html/rfc4287>`__, `RSS
Expand Down Expand Up @@ -161,8 +162,8 @@ request.
Include the ``shares=false`` query parameter to omit shares, eg Twitter
retweets, from the results.

To use the REST API in an existing ActivityStreams client, you’ll need
to hard-code exceptions for the domains you want to use
To use the REST API in an existing ActivityStreams/ActivityPub client,
you’ll need to hard-code exceptions for the domains you want to use
e.g. ``facebook.com``, and redirect HTTP requests to the corresponding
`endpoint above <#about>`__.

Expand All @@ -180,9 +181,8 @@ passing the HTTP handler object. The handler should have a ``request``
attribute for the current HTTP request.

The useful methods are ``get_activities()`` and ``get_actor()``, which
returns the current authenticated user (if any). See the `individual
method
docstrings <https://github.com/snarfed/granary/blob/master/source.py>`__
returns the current authenticated user (if any). See the `full reference
docs <https://granary.readthedocs.io/en/stable/source/granary.html#module-granary.source>`__
for details. All return values are Python dicts of decoded
ActivityStreams 1 JSON.

Expand All @@ -194,21 +194,7 @@ Troubleshooting/FAQ

Check out the `oauth-dropins Troubleshooting/FAQ
section <https://github.com/snarfed/oauth-dropins#troubleshootingfaq>`__.
It’s pretty comprehensive and applies to this project too. For
searchability, here are a handful of error messages that `have solutions
there <https://github.com/snarfed/oauth-dropins#troubleshootingfaq>`__:

::

bash: ./bin/easy_install: ...bad interpreter: No such file or directory

ImportError: cannot import name certs

ImportError: cannot import name tweepy

File ".../site-packages/tweepy/auth.py", line 68, in _get_request_token
raise TweepError(e)
TweepError: must be _socket.socket, not socket
It’s pretty comprehensive and applies to this project too.

Future work
-----------
Expand Down Expand Up @@ -290,10 +276,6 @@ reconfigure it to see system packages with
``virtualenv --system-site-packages local``.) Then, run
`docs/build.sh <https://github.com/snarfed/granary/blob/master/docs/build.sh>`__.

`This ActivityStreams
validator <http://activitystreamstester.appspot.com/>`__ is useful for
manual testing.

Release instructions
--------------------

Expand Down Expand Up @@ -464,32 +446,81 @@ Facebook and Twitter’s raw HTML.
Changelog
---------

6.1 - unreleased
6.0 - 2023-03-22
~~~~~~~~~~~~~~~~

*Breaking changes:*

- ``as2``:

- Interpret bare string ``object``, ``inReplyTo``, etc values as
ids, convert them to bare strings or ``id`` instead of ``url``.

- ``microformats2``:

- Convert simple string ``in-reply-to``, ``repost-of``, ``like-of``
etc values to AS1 bare strings or ``id``\ s instead of ``url``\ s.

*Non-breaking changes:*

- Add new ``bluesky`` module for
`Bluesky <https://blueskyweb.org/>`__/`AT
Protocol <https://atproto.com/>`__.
Protocol <https://atproto.com/>`__!
- ``as1``:

- Add the ``organization`` object type.
- Add the ``organization`` object type and ``ACTOR_TYPES`` constant
(`based on
AS2 <https://www.w3.org/TR/activitystreams-core/#actors>`__).
- Add new ``get_ids``, ``get_object``, and ``get_objects``
functions.

- ``activity_changed``: ignore ``inReplyTo.author``
(`snarfed/bridgy#1338 <https://github.com/snarfed/bridgy/issues/1338>`__)
- ``as2``:

- Support converting between AS1 ``stop-following`` and AS2 ``Undo``
``Follow``.
- Add the ``Organization`` object type.
- Support AS2 ``Accept`` and ``Reject`` for follows as well as event
RSVPs.
- Add support for the ``Question`` (ie poll), ``Organization``, and
``Delete`` object types.
- Convert ``to``/``cc`` to/from AS1 ``to`` for public and unlisted.
- Handle ``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 <https://github.com/snarfed/bridgy-fed/issues/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``.
- Preserve ``to`` and ``cc`` values when converting both directions.

- ``atom``:

- Bug fix for rendering image attachments without ``image`` field to
Atom.
- Bug fix for ``published`` and ``updated`` in entries with objects,
eg likes, reposts, RSVPs, bookmarks. Thanks
`@gregorlove <https://gregorlove.com/>`__!
(`#480 <https://github.com/snarfed/granary/issues/480>`__)
- Bug fix for content ``activity/ies_to_atom`` when ``object`` is
present and empty.
- Bug fix for objects with elements without ``objectType`` in the
``to`` field.

- ``flickr``:

- ``get_activities``: add support for the ``count`` kwarg.

- ``github``:

- ``get_activities``: add support for the ``count`` kwarg.

- ``jsonfeed``:

Expand All @@ -502,6 +533,7 @@ Changelog

- Add compatibility support for `Truth
Social <https://truthsocial.com/>`__.
- Handle truncated JSON API responses.

- ``microformats2``:

Expand All @@ -513,27 +545,17 @@ Changelog
attribute
(`bridgy-fed#331 <https://github.com/snarfed/bridgy-fed/issues/331>`__).
- Add new ``json_to_activities`` function.
- ``hcard_to_html``/``maybe_linked_name``: when ``name`` is missing,
use pretty URL as visible text.
- Support the ``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``.

- ``flickr``:

- ``get_activities``: add support for the ``count`` kwarg.

- ``github``:

- ``get_activities``: add support for the ``count`` kwarg.

6.0 - 2022-12-03
~~~~~~~~~~~~~~~~

- ``as1``:
- ``rss``:

- ``activity_changed``: ignore ``inReplyTo.author``
(`snarfed/bridgy#1338 <https://github.com/snarfed/bridgy/issues/1338>`__)
- ``from_activities``: fix item ordering to match input activities.

.. _section-1:

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


setup(name='granary',
version='5.0',
version='6.0',
description='The social web translator',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
Expand Down Expand Up @@ -44,7 +44,7 @@
'humanfriendly>=4.18',
'jinja2>=2.10',
'mf2util>=0.5.0',
'oauth-dropins>=6.0',
'oauth-dropins>=6.1',
'praw>=7.3.0',
'python-dateutil>=2.8',
'requests>=2.22',
Expand Down

0 comments on commit 26b708f

Please sign in to comment.