listparser


Namelistparser JSON
Version 0.20 PyPI version JSON
download
home_pagehttps://github.com/kurtmckee/listparser/
SummaryParse OPML subscription lists
upload_time2024-03-29 12:21:07
maintainerNone
docs_urlhttps://pythonhosted.org/listparser/
authorKurt McKee
requires_python>=3.8
licenseMIT
keywords opml foaf igoogle feed
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            listparser
==========

*Parse OPML subscription lists in Python.*

-------------------------------------------------------------------------------

If you're building a feed reader and you need to parse OPML subscription lists,
you've come to the right place!

listparser makes it easy to parse and use subscription lists in multiple formats.
It supports OPML, RDF+FOAF, and the iGoogle exported settings format,
and runs on Python 3.8+ and on PyPy 3.8.



Usage
=====

..  code-block:: pycon

    >>> import listparser
    >>> result = listparser.parse(open("feeds.opml").read())

A dictionary will be returned with several keys:

*   ``meta``: a dictionary of information about the subscription list
*   ``feeds``: a list of feeds
*   ``lists``: a list of subscription lists
*   ``version``: a format identifier like "opml2"
*   ``bozo``: True if there is a problem with the list, False otherwise
*   ``bozo_exception``: (if ``bozo`` is 1) a description of the problem

For convenience, the result dictionary supports attribute access for its keys.

Continuing the example:

..  code-block:: pycon

    >>> result.meta.title
    'listparser project feeds'
    >>> len(result.feeds)
    2
    >>> result.feeds[0].title, result.feeds[0].url
    ('listparser blog', 'https://kurtmckee.org/tag/listparser')

More extensive documentation is available in the ``docs/`` directory
`and online <https://listparser.readthedocs.io/en/latest/>`_.


Bugs
====

There are going to be bugs. The best way to handle them will be to
isolate the simplest possible document that susses out the bug, add
that document as a test case, and then find and fix the problem.

...you can also just report the bug and leave it to someone else
to fix the problem, but that won't be as much fun for you!

`Bugs can be reported on GitHub <https://github.com/kurtmckee/listparser/issues>`_.


Git workflow
============

listparser basically follows the git-flow methodology:

*   Features and changes are developed in branches off the ``main`` branch.
    They merge back into the ``main`` branch.
*   Feature releases branch off the ``main`` branch.
    The project metadata is updated (like the version and copyright years),
    and then the release branch merges into the ``releases`` branch.
    The ``releases`` branch is then tagged, and then it is merged back into ``main``.
*   Hotfixes branch off the ``releases`` branch.
    As with feature releases, the project metadata is updated,
    the hotfix branch merges back into the ``releases`` branch,
    which is then tagged and merged back into ``main``.


Development
===========

To set up a development environment, follow these steps at a command line:

..  code-block:: shell

    # Set up a virtual environment.
    python -m venv .venv

    # Activate the virtual environment in Linux:
    . .venv/bin/activate

    # ...or in Windows Powershell:
    & .venv/Scripts/Activate.ps1

    # Install dependencies.
    python -m pip install -U pip setuptools wheel
    python -m pip install poetry pre-commit tox scriv
    poetry install --all-extras

    # Enable pre-commit.
    pre-commit install

    # Run the unit tests.
    tox


When submitting a PR, be sure to create and edit a changelog fragment.

..  code-block:: shell

    scriv create


The changelog fragment will be created in the ``changelog.d/`` directory.
Edit the file to describe the changes you've made.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kurtmckee/listparser/",
    "name": "listparser",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/listparser/",
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "opml, foaf, igoogle, feed",
    "author": "Kurt McKee",
    "author_email": "contactme@kurtmckee.org",
    "download_url": "https://files.pythonhosted.org/packages/be/ee/d9f02600955ca34baf73e824d64b181b412745ed448a0ad1a92cef81115b/listparser-0.20.tar.gz",
    "platform": null,
    "description": "listparser\n==========\n\n*Parse OPML subscription lists in Python.*\n\n-------------------------------------------------------------------------------\n\nIf you're building a feed reader and you need to parse OPML subscription lists,\nyou've come to the right place!\n\nlistparser makes it easy to parse and use subscription lists in multiple formats.\nIt supports OPML, RDF+FOAF, and the iGoogle exported settings format,\nand runs on Python 3.8+ and on PyPy 3.8.\n\n\n\nUsage\n=====\n\n..  code-block:: pycon\n\n    >>> import listparser\n    >>> result = listparser.parse(open(\"feeds.opml\").read())\n\nA dictionary will be returned with several keys:\n\n*   ``meta``: a dictionary of information about the subscription list\n*   ``feeds``: a list of feeds\n*   ``lists``: a list of subscription lists\n*   ``version``: a format identifier like \"opml2\"\n*   ``bozo``: True if there is a problem with the list, False otherwise\n*   ``bozo_exception``: (if ``bozo`` is 1) a description of the problem\n\nFor convenience, the result dictionary supports attribute access for its keys.\n\nContinuing the example:\n\n..  code-block:: pycon\n\n    >>> result.meta.title\n    'listparser project feeds'\n    >>> len(result.feeds)\n    2\n    >>> result.feeds[0].title, result.feeds[0].url\n    ('listparser blog', 'https://kurtmckee.org/tag/listparser')\n\nMore extensive documentation is available in the ``docs/`` directory\n`and online <https://listparser.readthedocs.io/en/latest/>`_.\n\n\nBugs\n====\n\nThere are going to be bugs. The best way to handle them will be to\nisolate the simplest possible document that susses out the bug, add\nthat document as a test case, and then find and fix the problem.\n\n...you can also just report the bug and leave it to someone else\nto fix the problem, but that won't be as much fun for you!\n\n`Bugs can be reported on GitHub <https://github.com/kurtmckee/listparser/issues>`_.\n\n\nGit workflow\n============\n\nlistparser basically follows the git-flow methodology:\n\n*   Features and changes are developed in branches off the ``main`` branch.\n    They merge back into the ``main`` branch.\n*   Feature releases branch off the ``main`` branch.\n    The project metadata is updated (like the version and copyright years),\n    and then the release branch merges into the ``releases`` branch.\n    The ``releases`` branch is then tagged, and then it is merged back into ``main``.\n*   Hotfixes branch off the ``releases`` branch.\n    As with feature releases, the project metadata is updated,\n    the hotfix branch merges back into the ``releases`` branch,\n    which is then tagged and merged back into ``main``.\n\n\nDevelopment\n===========\n\nTo set up a development environment, follow these steps at a command line:\n\n..  code-block:: shell\n\n    # Set up a virtual environment.\n    python -m venv .venv\n\n    # Activate the virtual environment in Linux:\n    . .venv/bin/activate\n\n    # ...or in Windows Powershell:\n    & .venv/Scripts/Activate.ps1\n\n    # Install dependencies.\n    python -m pip install -U pip setuptools wheel\n    python -m pip install poetry pre-commit tox scriv\n    poetry install --all-extras\n\n    # Enable pre-commit.\n    pre-commit install\n\n    # Run the unit tests.\n    tox\n\n\nWhen submitting a PR, be sure to create and edit a changelog fragment.\n\n..  code-block:: shell\n\n    scriv create\n\n\nThe changelog fragment will be created in the ``changelog.d/`` directory.\nEdit the file to describe the changes you've made.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Parse OPML subscription lists",
    "version": "0.20",
    "project_urls": {
        "Documentation": "https://listparser.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/kurtmckee/listparser/",
        "Repository": "https://github.com/kurtmckee/listparser/"
    },
    "split_keywords": [
        "opml",
        " foaf",
        " igoogle",
        " feed"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c927bd96818acce8ed1909dff29817096016f5e958ef646a377b34d55afa23b3",
                "md5": "f1ea45d54913852a62ca2d18c741b261",
                "sha256": "5daae9895b75191a77b14f5b8eabf7a63a4ca440f215d9bd8d8e5a2eccde02ce"
            },
            "downloads": -1,
            "filename": "listparser-0.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f1ea45d54913852a62ca2d18c741b261",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14149,
            "upload_time": "2024-03-29T12:21:06",
            "upload_time_iso_8601": "2024-03-29T12:21:06.014140Z",
            "url": "https://files.pythonhosted.org/packages/c9/27/bd96818acce8ed1909dff29817096016f5e958ef646a377b34d55afa23b3/listparser-0.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "beeed9f02600955ca34baf73e824d64b181b412745ed448a0ad1a92cef81115b",
                "md5": "58fe7f8e2359e8b35b0dcbae46e368eb",
                "sha256": "0dda5b41ca9531fc3c438eb4abf4d8a7cf03ef050d196875993e897a66c1f885"
            },
            "downloads": -1,
            "filename": "listparser-0.20.tar.gz",
            "has_sig": false,
            "md5_digest": "58fe7f8e2359e8b35b0dcbae46e368eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12404,
            "upload_time": "2024-03-29T12:21:07",
            "upload_time_iso_8601": "2024-03-29T12:21:07.242542Z",
            "url": "https://files.pythonhosted.org/packages/be/ee/d9f02600955ca34baf73e824d64b181b412745ed448a0ad1a92cef81115b/listparser-0.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 12:21:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kurtmckee",
    "github_project": "listparser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "listparser"
}
        
Elapsed time: 0.52386s