From 3b217ce131f355439c86cf033a6a553ee836be1e Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 24 Dec 2024 09:47:22 -0600 Subject: [PATCH] Remove support for the iGoogle exported settings format --- README.rst | 3 +- ...24_094527_kurtmckee_rm_igoogle_support.rst | 4 ++ docs/detection-algorithm.rst | 5 +-- docs/index.rst | 3 +- docs/reference/object-categories.rst | 1 - docs/reference/object-tags.rst | 1 - docs/reference/object-url.rst | 1 - docs/reference/version.rst | 5 --- pyproject.toml | 2 +- src/listparser/__init__.py | 3 +- src/listparser/igoogle.py | 41 ------------------- src/listparser/xml_handler.py | 2 - tests/igoogle/GadgetTabML.xml | 8 ---- .../igoogle/ModulePrefs_xmlUrl-wrong_type.xml | 11 ----- tests/igoogle/ModulePrefs_xmlUrl.xml | 11 ----- tests/igoogle/hierarchy-bad.xml | 14 ------- tests/igoogle/hierarchy-multiple-tabs.xml | 21 ---------- tests/igoogle/hierarchy.xml | 14 ------- 18 files changed, 10 insertions(+), 140 deletions(-) create mode 100644 changelog.d/20241224_094527_kurtmckee_rm_igoogle_support.rst delete mode 100644 src/listparser/igoogle.py delete mode 100644 tests/igoogle/GadgetTabML.xml delete mode 100644 tests/igoogle/ModulePrefs_xmlUrl-wrong_type.xml delete mode 100644 tests/igoogle/ModulePrefs_xmlUrl.xml delete mode 100644 tests/igoogle/hierarchy-bad.xml delete mode 100644 tests/igoogle/hierarchy-multiple-tabs.xml delete mode 100644 tests/igoogle/hierarchy.xml diff --git a/README.rst b/README.rst index e708786..70c116c 100644 --- a/README.rst +++ b/README.rst @@ -7,8 +7,7 @@ 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.9+ and on PyPy 3.10. +It supports OPML and RDF+FOAF, and runs on Python 3.9+ and on PyPy 3.10. diff --git a/changelog.d/20241224_094527_kurtmckee_rm_igoogle_support.rst b/changelog.d/20241224_094527_kurtmckee_rm_igoogle_support.rst new file mode 100644 index 0000000..d6d1c0e --- /dev/null +++ b/changelog.d/20241224_094527_kurtmckee_rm_igoogle_support.rst @@ -0,0 +1,4 @@ +Removed +------- + +* Remove support for the iGoogle exported settings format. diff --git a/docs/detection-algorithm.rst b/docs/detection-algorithm.rst index 00aef55..d4d4c3e 100644 --- a/docs/detection-algorithm.rst +++ b/docs/detection-algorithm.rst @@ -3,9 +3,8 @@ Feed and subscription list detection algorithm .. note:: - Neither RDF+FOAF nor the iGoogle exported settings formats support - embedded subscription lists. This detection algorithm only applies - to OPML subscription lists. + RDF+FOAF does not support embedded subscription lists. + This detection algorithm only applies to OPML subscription lists. Many services and softwares output OPML subscription lists with slight variations. listparser attempts to correctly determine whether an diff --git a/docs/index.rst b/docs/index.rst index 79083ef..056f56f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,8 +11,7 @@ If you're building a feed reader and you need to import 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.9+ and on PyPy 3.10. +It supports OPML and RDF+FOAF, and runs on Python 3.9+ and on PyPy 3.10. Contents diff --git a/docs/reference/object-categories.rst b/docs/reference/object-categories.rst index 5d02406..2171326 100644 --- a/docs/reference/object-categories.rst +++ b/docs/reference/object-categories.rst @@ -27,7 +27,6 @@ the ``opml:outline`` element as a source of categorization information. * ``/opml/body//outline/@category`` [#slashes]_ * ``/opml/body//outline/ancestor::outline/@text`` * ``/opml/body//outline/ancestor::outline/@title`` -* ``/gtml:GadgetTabML//gtml:Tab/@title`` * ``/rdf:RDF/foaf:Group/foaf:name`` * ``/rdf:RDF//foaf:Agent/foaf:name`` diff --git a/docs/reference/object-tags.rst b/docs/reference/object-tags.rst index d4f4231..cd16ac4 100644 --- a/docs/reference/object-tags.rst +++ b/docs/reference/object-tags.rst @@ -20,7 +20,6 @@ In this example, there is one tag: ``sports``. * ``/opml/body//outline/@category`` [#noslashes]_ * ``/opml/body/outline/outline/parent::outline/@text`` * ``/opml/body/outline/outline/parent::outline/@title`` -* ``/gtml:GadgetTabML//gtml:Tab/@title`` * ``/rdf:RDF/foaf:Group/foaf:name`` * ``/rdf:RDF//foaf:Agent/foaf:name`` diff --git a/docs/reference/object-url.rst b/docs/reference/object-url.rst index a77c202..2bdac7f 100644 --- a/docs/reference/object-url.rst +++ b/docs/reference/object-url.rst @@ -10,7 +10,6 @@ to indicate what format the target feed is presented in. .. rubric:: Feed URLs come from * ``/opml/body//outline/@xmlUrl`` -* ``/gtml:GadgetTabML//iGoogle:Module[@type="RSS"]/iGoogle:ModulePrefs/@xmlUrl`` * ``/rdf:RDF//foaf:Agent//rss:channel/@rdf:about`` * ``/rdf:RDF//ya:feed/@rdf:resource`` diff --git a/docs/reference/version.rst b/docs/reference/version.rst index 881dd35..32130b5 100644 --- a/docs/reference/version.rst +++ b/docs/reference/version.rst @@ -19,9 +19,6 @@ opml rdf `RDF+FOAF `_ -igoogle - iGoogle exported settings format [#igoogle]_ - .. rubric:: Footnotes @@ -34,5 +31,3 @@ igoogle and included this message: [If] you see an OPML 1.1 file, you should treat it like an OPML 1.0 file. That's it. Enjoy! - -.. [#igoogle] `How to export your iGoogle page settings `_ diff --git a/pyproject.toml b/pyproject.toml index e749eee..29f17e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "MIT" readme = "README.rst" repository = "https://github.com/kurtmckee/listparser/" documentation = "https://listparser.readthedocs.io/en/latest/" -keywords = ["opml", "foaf", "igoogle", "feed"] +keywords = ["opml", "foaf", "feed"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/src/listparser/__init__.py b/src/listparser/__init__.py index e935ad5..d2785d8 100644 --- a/src/listparser/__init__.py +++ b/src/listparser/__init__.py @@ -20,7 +20,7 @@ except ImportError: lxml = None # type: ignore[assignment] -from . import common, foaf, igoogle, opml, xml_handler +from . import common, foaf, opml, xml_handler from .exceptions import ListparserError __author__ = "Kurt McKee " @@ -33,7 +33,6 @@ ( opml.OpmlMixin, foaf.FoafMixin, - igoogle.IgoogleMixin, xml_handler.XMLHandler, ), {}, diff --git a/src/listparser/igoogle.py b/src/listparser/igoogle.py deleted file mode 100644 index 8d71e71..0000000 --- a/src/listparser/igoogle.py +++ /dev/null @@ -1,41 +0,0 @@ -# This file is part of listparser. -# Copyright 2009-2024 Kurt McKee -# SPDX-License-Identifier: MIT -# - -from __future__ import annotations - -import copy -import typing as t - -from . import common - - -class IgoogleMixin(common.Common): - def start_gtml_gadgettabml(self, _: t.Any) -> None: - self.harvest["version"] = "igoogle" - - def start_gtml_tab(self, attrs: dict[str, str]) -> None: - if attrs.get("title", "").strip(): - self.hierarchy.append(attrs["title"].strip()) - - def end_gtml_tab(self) -> None: - if self.hierarchy: - self.hierarchy.pop() - - def start_igoogle_module(self, attrs: dict[str, str]) -> None: - if attrs.get("type", "").strip().lower() == "rss": - self.flag_feed = True - - def end_igoogle_module(self) -> None: - self.flag_feed = False - - def start_igoogle_moduleprefs(self, attrs: dict[str, str]) -> None: - if self.flag_feed and attrs.get("xmlurl", "").strip(): - obj = common.SuperDict({"url": attrs["xmlurl"].strip()}) - obj["title"] = "" - if self.hierarchy: - obj["categories"] = [copy.copy(self.hierarchy)] - if len(self.hierarchy) == 1: - obj["tags"] = copy.copy(self.hierarchy) - self.harvest["feeds"].append(obj) diff --git a/src/listparser/xml_handler.py b/src/listparser/xml_handler.py index 0864cb7..5246685 100644 --- a/src/listparser/xml_handler.py +++ b/src/listparser/xml_handler.py @@ -12,8 +12,6 @@ prefixes = { "http://opml.org/spec2": "opml", - "http://www.google.com/ig": "igoogle", - "http://schemas.google.com/GadgetTabML/2008": "gtml", "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", "http://www.w3.org/2000/01/rdf-schema#": "rdfs", "http://xmlns.com/foaf/0.1/": "foaf", diff --git a/tests/igoogle/GadgetTabML.xml b/tests/igoogle/GadgetTabML.xml deleted file mode 100644 index 6e269c3..0000000 --- a/tests/igoogle/GadgetTabML.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/tests/igoogle/ModulePrefs_xmlUrl-wrong_type.xml b/tests/igoogle/ModulePrefs_xmlUrl-wrong_type.xml deleted file mode 100644 index 9228dc5..0000000 --- a/tests/igoogle/ModulePrefs_xmlUrl-wrong_type.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/tests/igoogle/ModulePrefs_xmlUrl.xml b/tests/igoogle/ModulePrefs_xmlUrl.xml deleted file mode 100644 index c0b6ac2..0000000 --- a/tests/igoogle/ModulePrefs_xmlUrl.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/tests/igoogle/hierarchy-bad.xml b/tests/igoogle/hierarchy-bad.xml deleted file mode 100644 index 65bdef5..0000000 --- a/tests/igoogle/hierarchy-bad.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/tests/igoogle/hierarchy-multiple-tabs.xml b/tests/igoogle/hierarchy-multiple-tabs.xml deleted file mode 100644 index 66c8f53..0000000 --- a/tests/igoogle/hierarchy-multiple-tabs.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tests/igoogle/hierarchy.xml b/tests/igoogle/hierarchy.xml deleted file mode 100644 index 824b575..0000000 --- a/tests/igoogle/hierarchy.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - -