Supporting custom namespaces?

Aperta
#7 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
JavaScript
Stelle
104
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scripting/reallysimple

Tutte le issue di scripting/reallysimple

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.