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

XML to JSON parser #16 #30

Closed
wants to merge 2 commits into from
Closed

XML to JSON parser #16 #30

wants to merge 2 commits into from

Conversation

Immutablevoid
Copy link
Contributor

@Immutablevoid Immutablevoid commented Nov 4, 2019

DO NOT MERGE WITHOUT THE APPROVAL OF @c3ho. @c3ho is the person who originally wanted to work on this issue first.

This code converts XML blog feeds to JSON. The purpose of this code is to get something started, this code is not concrete. Hopefully will be edited or trash by @c3ho (Waiting on feedback).

How to run the parser:
npm install rss-to-json
node parser.js

@humphd
Copy link
Contributor

humphd commented Nov 5, 2019

I like how you've jumped in and got something working that let's us move forward. Good job.

I wonder if rss-to-json is the best choice for this. It has no tests, and parsing RSS and ATOM feeds is tricky to get right. I wonder if we should evaluate some other libs as well, maybe https://www.npmjs.com/package/feedparser, https://www.npmjs.com/package/rss-parser, https://www.npmjs.com/package/htmlparser2, etc. I think the usual suggested one to use is https://www.npmjs.com/package/feedparser, which also provides streaming support (i.e., better for memory consumption).

@Immutablevoid
Copy link
Contributor Author

Immutablevoid commented Nov 5, 2019

Possible packages for parsing (I will be updating this list as more feedback comes in):

Packages Note Recommend? ❌ ✔️
rss-parser I found the package rss-parser doesn't show all the contents of the blog (Link to my blog for more information: https://wordpress.com/block-editor/post/paulopensourceblog.wordpress.com/1137) It would be great if someone was able to get it working but it didn't for me @ImmutableBox
rss-to-json Does not work with ATOM feeds @ImmutableBox
feedparser Pull request created by @c3ho: #37 🔨
htmlparser2 Needs researching. (Feel free to contribute) 🔨

Reviewing the code I committed 9fb7b34, I found that package rss-to-json does not work with ATOM feeds, I will try researching the other packages as suggested.

@c3ho
Copy link
Contributor

c3ho commented Nov 5, 2019

@ImmutableBox I put up a simple PR with the prof's suggested library. Feel free to review it here #37, I welcome any changes.

@humphd
Copy link
Contributor

humphd commented Nov 5, 2019

@ImmutableBox now that #37 is up, maybe we should close this, and iterate there?

@Immutablevoid
Copy link
Contributor Author

Yup, I will close the pull request. Reference #37 for continuation.

@Immutablevoid Immutablevoid deleted the issue16 branch November 5, 2019 18:53
@Reza-Rajabi Reza-Rajabi added this to Closed in Main Nov 6, 2019
menghif pushed a commit to menghif/telescope that referenced this pull request Mar 8, 2022
…h-2.x

fix(deps): update dependency node-fetch to v2.6.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Main
Closed
Development

Successfully merging this pull request may close these issues.

None yet

4 participants