redturtle.rssservice


Nameredturtle.rssservice JSON
Version 2.2.1 PyPI version JSON
download
home_pagehttps://github.com/collective/redturtle.rssservice
SummaryAn add-on for Plone
upload_time2023-07-12 07:43:23
maintainer
docs_urlNone
authorRedTurtle
requires_python>3.6
licenseGPL version 2
keywords python plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

.. image:: https://img.shields.io/pypi/v/redturtle.rssservice.svg
    :target: https://pypi.org/project/redturtle.rssservice/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/redturtle.rssservice.svg?style=plastic
    :target: https://pypi.org/project/redturtle.rssservice/
    :alt: Supported - Python Versions

.. image:: https://img.shields.io/pypi/dm/redturtle.rssservice.svg
    :target: https://pypi.org/project/redturtle.rssservice/
    :alt: Number of PyPI downloads

.. image:: https://img.shields.io/pypi/l/redturtle.rssservice.svg
    :target: https://pypi.org/project/redturtle.rssservice/
    :alt: License

.. image:: https://github.com/RedTurtle/redturtle.rssservice/actions/workflows/test.yml/badge.svg
    :target: https://github.com/RedTurtle/redturtle.rssservice/actions
    :alt: Tests

.. image:: https://coveralls.io/repos/github/RedTurtle/redturtle.rssservice/badge.svg?branch=master
    :target: https://coveralls.io/github/RedTurtle/redturtle.rssservice?branch=master
    :alt: Coverage

=====================
Redturtle RSS Service
=====================

This package add support to retrieve RSS feeds from external sources.

Usage
=====


RSS block
---------

There is a service "**@rss_mixer_data**" that accept a block id, and return a list of sorted feeds by date.

This service only accept GET calls and accept following parameters:

- block: the id of the rssBlock with the feeds

The endpoint should be called on the context that has the rssBlock that you want to show.


For example::

    > curl -i -X GET http://localhost:8080/Plone/example-page/@rss_mixer_data?block=123456789 -H 'Accept: application/json' -H 'Content-Type: application/json'


Will reply with something like this::

    [
        {
            "source": "Foo site",
            "contentSnippet": "some description 2",
            "title": "Foo News 2",
            "date": "Thu, 1 Apr 2020 10:44:01 +0200",
            "url": "http://test.com/foo-news-2"
        },
        {
            "source": "",
            "contentSnippet": "some description 2",
            "title": "Bar News 2",
            "date": "Thu, 1 Apr 2020 10:44:01 +0200",
            "url": "http://test.com/bar-news-2"
        },
        {
            "source": "Foo site",
            "contentSnippet": "some description",
            "title": "Foo News 1",
            "date": "Thu, 2 Apr 2020 10:44:01 +0200",
            "url": "http://test.com/foo-news-1"
        },
        {
            "source": "",
            "contentSnippet": "some description",
            "title": "Bar News 1",
            "date": "Thu, 2 Apr 2020 10:44:01 +0200",
            "url": "http://test.com/bar-news-1"
        }
    ]

This endpoint works with `volto-rss-block <https://github.com/RedTurtle/volto-rss-block/>`_ plugin.

Retrieve timeout
----------------

There is a 5s default timeout for retrieve RSS feeds.

You can override it with an environment variable: **RSS_SERVICE_TIMEOUT**

Set User-Agent
--------------

You can override the default ``User-Agent`` for the requests to get feeds by setting an environment variable: **RSS_USER_AGENT**

Installation
============

Install redturtle.rssservice by adding it to your buildout::

    [buildout]

    ...

    eggs =
        redturtle.rssservice


and then running ``bin/buildout``


Contribute
==========

- Issue Tracker: https://github.com/RedTurtle/redturtle.rssservice/issues
- Source Code: https://github.com/RedTurtle/redturtle.rssservice


Support
=======

If you are having issues, please let us know.
We have a mailing list located at: sviluppo@redturtle.it


License
=======

The project is licensed under the GPLv2.


Contributors
============

- RedTurtle, sviluppo@redturtle.it


Changelog
=========

2.2.1 (2023-07-12)
------------------

- Handle case when feed url is an internal url with resolveuid.
  [cekk]
- Do not print exception on log, but use warning because it's handled.
  [cekk]

2.2.0 (2023-03-21)
------------------

- Allow configuring the User-Agent for the requests to get feeds,
  via the REQUESTS_USER_AGENT environment variable.
  [davisagli]


2.1.0 (2023-03-10)
------------------

- Customizable timeout.
  [cekk]
- Return 404 if block not found instead BadRequest.
  [cekk]
- Handle site root blocks in plone 6.
  [cekk]


2.0.0 (2022-04-07)
------------------

- Remove unused and unsafe endpoint.
  [cekk]
- Now @rss_mixer_data accept GET calls (see README for more infos).
  [cekk]


1.0.3 (2022-03-22)
------------------

- Allow to use cateogry in rss feed.
  [lucabel]


1.0.2 (2022-03-04)
------------------

- Allow dates with wrong date format (eg. a date range)
  [lucabel]


1.0.1 (2021-12-02)
------------------

- Fix python version in setup.py
  [cekk]

1.0.0 (2021-10-13)
------------------

- Add @rss_mixer_data endpoint.
  [cekk]


0.1.0 (2020-04-08)
------------------

- Initial release.
  [cekk]
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/redturtle.rssservice",
    "name": "redturtle.rssservice",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">3.6",
    "maintainer_email": "",
    "keywords": "Python Plone",
    "author": "RedTurtle",
    "author_email": "sviluppo@redturtle.it",
    "download_url": "https://files.pythonhosted.org/packages/c9/63/5efd06ea4725b75454d95362167af5b8b1c0cab9263b8e7e58e9da011ea0/redturtle.rssservice-2.2.1.tar.gz",
    "platform": null,
    "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n.. image:: https://img.shields.io/pypi/v/redturtle.rssservice.svg\n    :target: https://pypi.org/project/redturtle.rssservice/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/redturtle.rssservice.svg?style=plastic\n    :target: https://pypi.org/project/redturtle.rssservice/\n    :alt: Supported - Python Versions\n\n.. image:: https://img.shields.io/pypi/dm/redturtle.rssservice.svg\n    :target: https://pypi.org/project/redturtle.rssservice/\n    :alt: Number of PyPI downloads\n\n.. image:: https://img.shields.io/pypi/l/redturtle.rssservice.svg\n    :target: https://pypi.org/project/redturtle.rssservice/\n    :alt: License\n\n.. image:: https://github.com/RedTurtle/redturtle.rssservice/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/RedTurtle/redturtle.rssservice/actions\n    :alt: Tests\n\n.. image:: https://coveralls.io/repos/github/RedTurtle/redturtle.rssservice/badge.svg?branch=master\n    :target: https://coveralls.io/github/RedTurtle/redturtle.rssservice?branch=master\n    :alt: Coverage\n\n=====================\nRedturtle RSS Service\n=====================\n\nThis package add support to retrieve RSS feeds from external sources.\n\nUsage\n=====\n\n\nRSS block\n---------\n\nThere is a service \"**@rss_mixer_data**\" that accept a block id, and return a list of sorted feeds by date.\n\nThis service only accept GET calls and accept following parameters:\n\n- block: the id of the rssBlock with the feeds\n\nThe endpoint should be called on the context that has the rssBlock that you want to show.\n\n\nFor example::\n\n    > curl -i -X GET http://localhost:8080/Plone/example-page/@rss_mixer_data?block=123456789 -H 'Accept: application/json' -H 'Content-Type: application/json'\n\n\nWill reply with something like this::\n\n    [\n        {\n            \"source\": \"Foo site\",\n            \"contentSnippet\": \"some description 2\",\n            \"title\": \"Foo News 2\",\n            \"date\": \"Thu, 1 Apr 2020 10:44:01 +0200\",\n            \"url\": \"http://test.com/foo-news-2\"\n        },\n        {\n            \"source\": \"\",\n            \"contentSnippet\": \"some description 2\",\n            \"title\": \"Bar News 2\",\n            \"date\": \"Thu, 1 Apr 2020 10:44:01 +0200\",\n            \"url\": \"http://test.com/bar-news-2\"\n        },\n        {\n            \"source\": \"Foo site\",\n            \"contentSnippet\": \"some description\",\n            \"title\": \"Foo News 1\",\n            \"date\": \"Thu, 2 Apr 2020 10:44:01 +0200\",\n            \"url\": \"http://test.com/foo-news-1\"\n        },\n        {\n            \"source\": \"\",\n            \"contentSnippet\": \"some description\",\n            \"title\": \"Bar News 1\",\n            \"date\": \"Thu, 2 Apr 2020 10:44:01 +0200\",\n            \"url\": \"http://test.com/bar-news-1\"\n        }\n    ]\n\nThis endpoint works with `volto-rss-block <https://github.com/RedTurtle/volto-rss-block/>`_ plugin.\n\nRetrieve timeout\n----------------\n\nThere is a 5s default timeout for retrieve RSS feeds.\n\nYou can override it with an environment variable: **RSS_SERVICE_TIMEOUT**\n\nSet User-Agent\n--------------\n\nYou can override the default ``User-Agent`` for the requests to get feeds by setting an environment variable: **RSS_USER_AGENT**\n\nInstallation\n============\n\nInstall redturtle.rssservice by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        redturtle.rssservice\n\n\nand then running ``bin/buildout``\n\n\nContribute\n==========\n\n- Issue Tracker: https://github.com/RedTurtle/redturtle.rssservice/issues\n- Source Code: https://github.com/RedTurtle/redturtle.rssservice\n\n\nSupport\n=======\n\nIf you are having issues, please let us know.\nWe have a mailing list located at: sviluppo@redturtle.it\n\n\nLicense\n=======\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- RedTurtle, sviluppo@redturtle.it\n\n\nChangelog\n=========\n\n2.2.1 (2023-07-12)\n------------------\n\n- Handle case when feed url is an internal url with resolveuid.\n  [cekk]\n- Do not print exception on log, but use warning because it's handled.\n  [cekk]\n\n2.2.0 (2023-03-21)\n------------------\n\n- Allow configuring the User-Agent for the requests to get feeds,\n  via the REQUESTS_USER_AGENT environment variable.\n  [davisagli]\n\n\n2.1.0 (2023-03-10)\n------------------\n\n- Customizable timeout.\n  [cekk]\n- Return 404 if block not found instead BadRequest.\n  [cekk]\n- Handle site root blocks in plone 6.\n  [cekk]\n\n\n2.0.0 (2022-04-07)\n------------------\n\n- Remove unused and unsafe endpoint.\n  [cekk]\n- Now @rss_mixer_data accept GET calls (see README for more infos).\n  [cekk]\n\n\n1.0.3 (2022-03-22)\n------------------\n\n- Allow to use cateogry in rss feed.\n  [lucabel]\n\n\n1.0.2 (2022-03-04)\n------------------\n\n- Allow dates with wrong date format (eg. a date range)\n  [lucabel]\n\n\n1.0.1 (2021-12-02)\n------------------\n\n- Fix python version in setup.py\n  [cekk]\n\n1.0.0 (2021-10-13)\n------------------\n\n- Add @rss_mixer_data endpoint.\n  [cekk]\n\n\n0.1.0 (2020-04-08)\n------------------\n\n- Initial release.\n  [cekk]",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "An add-on for Plone",
    "version": "2.2.1",
    "project_urls": {
        "Homepage": "https://github.com/collective/redturtle.rssservice",
        "PyPI": "https://pypi.python.org/pypi/redturtle.rssservice",
        "Source": "https://github.com/collective/redturtle.rssservice",
        "Tracker": "https://github.com/collective/redturtle.rssservice/issues"
    },
    "split_keywords": [
        "python",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9635efd06ea4725b75454d95362167af5b8b1c0cab9263b8e7e58e9da011ea0",
                "md5": "4013997a60c58215ba59459350d0ffef",
                "sha256": "2068a10ff44969cdf60d1e5af9d93d1ca5f4a17b6f511e4a417a55951dfa1059"
            },
            "downloads": -1,
            "filename": "redturtle.rssservice-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4013997a60c58215ba59459350d0ffef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.6",
            "size": 24946,
            "upload_time": "2023-07-12T07:43:23",
            "upload_time_iso_8601": "2023-07-12T07:43:23.713201Z",
            "url": "https://files.pythonhosted.org/packages/c9/63/5efd06ea4725b75454d95362167af5b8b1c0cab9263b8e7e58e9da011ea0/redturtle.rssservice-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 07:43:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "redturtle.rssservice",
    "github_not_found": true,
    "lcname": "redturtle.rssservice"
}
        
Elapsed time: 0.21528s