Supporting custom namespaces?

Open
#7 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

No source file or test is named in the issue. Start by locating the RSS/Atom parser entry point and its handling of element names, then use the sample feed to check whether the custom books:bookid field is preserved alongside standard fields.

Written by the indexing model from the issue text.

Description

Hey there, love what you're doing here Dave to make things simple and easy to use :)

Question - should this parse custom namespaces? For example, I'm playing around with adding structured data for a "books" rss project and made a mockup here:

https://wooden-honorable-kale.glitch.me/feed.xml

So this code:

<item>
<title>Testing new fields</title>
<description>Some description </description>
<pubDate>Thu, 16 Jun 2022 00:00:00 +0000</pubDate>
<books:bookid>https://openlibrary.org/works/OL19098683W</books:bookid>
<link>http://tomcritchlow.com/2022/06/16/rejecting-specialization/</link>
<guid isPermaLink="true">http://tomcritchlow.com/2022/06/16/rejecting-specialization/</guid>
</item>

Get's parsed using reallysimple as:

        {
            "title": "Testing new fields",
            "description": "Some description",
            "pubDate": "2022-06-16T00:00:00.000Z",
            "link": "http://tomcritchlow.com/2022/06/16/rejecting-specialization/",
            "guid": "http://tomcritchlow.com/2022/06/16/rejecting-specialization/"
        }

Ideally I'd like to generate something like this:

        {
            "title": "Testing new fields",
            "description": "Some description",
            "pubDate": "2022-06-16T00:00:00.000Z",
           "books:bookid":"https://openlibrary.org/works/OL19098683W"
            "link": "http://tomcritchlow.com/2022/06/16/rejecting-specialization/",
            "guid": "http://tomcritchlow.com/2022/06/16/rejecting-specialization/"
        }

I'm a bit of a coding beginner (and not sure if I coded the custom namespace correctly?) so forgive me if this doesn't make sense or I'm doing something wrong

Dominant language
JavaScript
Stars
104
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/reallysimple

All issues in scripting/reallysimple

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.