Coder Social home page Coder Social logo

Comments (3)

kurtmckee avatar kurtmckee commented on July 19, 2024 1

I think I understand your use case now, and I appreciate the example case you provided!

However, I don't think listparser should help resolve this issue.

from listparser.

kurtmckee avatar kurtmckee commented on July 19, 2024

listparser supports 3 different XML formats. While OPML is the most common by far, listparser was written to support OPML, FOAF (used by e.g. the LiveJournal platform, Planet Mozilla, Planet Gnome, etc), and iGoogle (which Google shut down a few years after listparser added support).

listparser's goal is to give feed readers access to basic information about the feed or subscription list:

  1. A URL (mandatory)
  2. The title of the feed or subscription list that the user set
  3. Category or tag information that the user set

listparser doesn't attempt to map OPML XML attributes directly to Python attributes, and its goal is not to expose all XML elements and attributes from the supported XML formats. I don't want listparser to expose multiple attributes by name; I only want it to expose information that feed readers need to import the user's title/catorgery/tag information.

from listparser.

Rongronggg9 avatar Rongronggg9 commented on July 19, 2024

I only want it to expose information that feed readers need to import the user's title/catorgery/tag information.

I agree with that. But does the current behavior really provide enough "information that feed readers need to import the user's title"? Why is it important to determine if the title is user-defined or not? Can't the feed reader just fetch the feed once, and then compare its title with feed.title from listparser? Let's imagine such a case:

  1. Some feeds occasionally update their title ("remote title").
  2. An RSS reader may be implemented to follow the remote title change unless users have defined their custom title.
  3. A user exports OPML from the RSS reader as a backup. Each feed's outline comes with text attr (user-defined title, if available, else feed title) and title attr (always feed title).
  4. Days later, some of these feeds happen to update their titles.
  5. The user imports the OPML into the RSS reader on a new device.
  6. If we can only compare feed.title from listparser with the fetched title ("remote title"), since they differ, feed.title from listparser can only be considered as user-defined. As a result, it will override the remote title. The user may consider this an undesired behavior if they want the title in the RSS reader to follow the remote one every day.
  7. My proposal is a solution to the above case.

I admit that the case may be an edge case. If you consider it "out of listparser's business", nevermind :)

from listparser.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.