Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS Parser Library #68

Open
devYonz opened this issue Nov 17, 2022 · 5 comments
Open

RSS Parser Library #68

devYonz opened this issue Nov 17, 2022 · 5 comments

Comments

@devYonz
Copy link

devYonz commented Nov 17, 2022

Hey @agazso, you may have the best RN RSS parser that supports both Atom and RSS 1.0 and 2.0 specs. Would be great to see the RSSFeedHelper broken out to a an RN-rss-parser or something like that. I'm sure you had already looked at react-native-rss-parser or tried to rn-nodify rss-parser before resorting to building your own.

One huge feature would be to implement a light HTML parser for content values like Reddit. I am currently using RenderHtml from "react-native-render-html"; but it is doing too much.

Reddit content value for: https://www.reddit.com/top.rss?t=all
<content type="html">&lt;table> &lt;tr>&lt;td> &lt;a href="https://www.reddit.com/r/pics/comments/haucpf/ive_found_a_few_funny_memories_during_lockdown/"> &lt;img src="https://preview.redd.it/f58v4g8mwh551.jpg?width=640&amp;amp;crop=smart&amp;amp;auto=webp&amp;amp;s=f1ac5ce4b8411b6ba000dc0c4c37cd2e926fe814" alt="I’ve found a few funny memories during lockdown. This is from my 1st tour in 89, backstage in Vegas." title="I’ve found a few funny memories during lockdown. This is from my 1st tour in 89, backstage in Vegas." /> &lt;/a> &lt;/td>&lt;td> &amp;#32; submitted by &amp;#32; &lt;a href="https://www.reddit.com/user/ReallyRickAstley"> /u/ReallyRickAstley &lt;/a> &amp;#32; to &amp;#32; &lt;a href="https://www.reddit.com/r/pics/"> r/pics &lt;/a> &lt;br/> &lt;span>&lt;a href="https://i.redd.it/f58v4g8mwh551.jpg">[link]&lt;/a>&lt;/span> &amp;#32; &lt;span>&lt;a href="https://www.reddit.com/r/pics/comments/haucpf/ive_found_a_few_funny_memories_during_lockdown/">[comments]&lt;/a>&lt;/span> &lt;/td>&lt;/tr>&lt;/table></content>

@agazso
Copy link
Member

agazso commented Nov 28, 2022

Hey, thanks for opening an issue. I think it is a great idea to extract the feed handling to a separate package. When I started working on this I indeed looked at the rss-parser package and based on that I created RSS support for my version. This was in 2017, so I didn't know rn-nodify and there were no react-native-rss-parser or other alternatives.

In the future I plan to work on a browser based feed reader and for that this would be also handy, however at the moment I have no capacity to work on this. If you feel like tackling the problem I am happy to help though, with discussing approaches or with reviews.

I would keep HTML parsing out of the scope of this, because that is a huge topic in itself that could warrant a separate library. For reddit content the Feeds app is using the JSON feed type that reddit provides, because it is better structured and in general easier to work with. For the details, see: https://github.com/felfele/feeds/blob/master/src/helpers/redditFeedHelpers.ts

Hope this helps.

@devYonz
Copy link
Author

devYonz commented Dec 20, 2022

Thanks for the tip also played with your app for a bit, the views and cards are pretty clean. Good Job!

@devYonz
Copy link
Author

devYonz commented Apr 20, 2024 via email

@agazso
Copy link
Member

agazso commented Apr 22, 2024

Fair point, i've played with a few libs since then but nothing has worked well. Also run into the issue trying to render emails. What are you working on these days? ​ ​-Yonz ​

Currently I am working on a self-hosted web app instead of the mobile app. You can see a preview here for news:
https://feeds.felfele.org/news
Or a channel with youtube feeds: https://feeds.felfele.org/music

Eventually I would like to separate the library, but at the moment I have little time for this. I am looking at grants to get funding for this work.

@devYonz
Copy link
Author

devYonz commented May 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants