{"id":18011247,"url":"https://github.com/mikaelporttila/rss","last_synced_at":"2025-04-09T12:04:05.440Z","repository":{"id":40295418,"uuid":"273046536","full_name":"MikaelPorttila/rss","owner":"MikaelPorttila","description":"📰 Deno module for deserializing RSS or ATOM XML feeds into typed objects ","archived":false,"fork":false,"pushed_at":"2025-02-13T19:40:19.000Z","size":185,"stargazers_count":58,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T12:03:25.693Z","etag":null,"topics":["atom","deno","deserializer","parser","rss"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikaelPorttila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-17T18:09:33.000Z","updated_at":"2025-04-04T03:54:30.000Z","dependencies_parsed_at":"2024-01-15T19:44:53.434Z","dependency_job_id":"bb329779-deeb-47ce-9ad5-80ec798e3acd","html_url":"https://github.com/MikaelPorttila/rss","commit_stats":{"total_commits":84,"total_committers":8,"mean_commits":10.5,"dds":0.1071428571428571,"last_synced_commit":"af0fe9be7d56fc4632bb79e55231af94f7c33a33"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelPorttila%2Frss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelPorttila%2Frss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelPorttila%2Frss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelPorttila%2Frss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikaelPorttila","download_url":"https://codeload.github.com/MikaelPorttila/rss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036064,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","deno","deserializer","parser","rss"],"created_at":"2024-10-30T03:08:01.675Z","updated_at":"2025-04-09T12:04:05.408Z","avatar_url":"https://github.com/MikaelPorttila.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/MikaelPorttila/rss/workflows/CI/badge.svg?branch=master)\n[![tag](https://img.shields.io/github/tag/MikaelPorttila/rss.svg)](https://github.com/MikaelPorttila/rss/releases)\n[![DenoLib](https://denolib.com/badge?scope=MikaelPorttila\u0026repo=rss)](https://github.com/denolib)\n[![Deno Third Party Modules](https://shield.deno.dev/x/rss)](https://deno.land/x/rss)\n[![JSR](https://jsr.io/badges/@mikaelporttila/rss)](https://jsr.io/@mikaelporttila/rss)\n## About\n\nRSS and Atom deserialization module for Deno.\u003cbr/\u003eThe project aims to provide a\nlightweight and easy-to-use feed deserializer.\n\n[Check out the deserializer in this online\nshowcase](https://repl.it/@MikaelPorttila/Deno-RSS-Module)\n\n## Usage - Download and parse feed\n\n### Download and parse feed\n```typescript\nimport { parseFeed } from \"jsr:@mikaelporttila/rss@*\";\n// Or by using Denoland direct import\n// import { parseFeed } from \"https://deno.land/x/rss/mod.ts\";\n\nconst response = await fetch(\n  \"http://static.userland.com/gems/backend/rssTwoExample2.xml\",\n);\nconst xml = await response.text();\nconst feed = await parseFeed(xml);\n\n// Your code...\n```\n\n### How to access Dublin Core or MediaRss fields (RSS and RSS2 Only)\n\n```typescript\nimport {\n  DublinCore,\n  MediaRss,\n  parseFeed,\n} from \"https://deno.land/x/rss/mod.ts\";\n\nconst response = await fetch(\n  \"http://static.userland.com/gems/backend/rssTwoExample2.xml\",\n);\nconst xml = await response.text();\n\n// Optional destructuring assignment\nconst { entries } = await parseFeed(xml);\n\n// Access fields using the DublinCore and MediaRss enums\nconst dcTitle = entries[0][DublinCore.Title];\nconst mediaContent = entries[0][MediaRss.Content];\n```\n\n## Mapping Table\n\n### Feed\n\n| Feed                  | Atom      | RSS2                                                                  | RSS                                       |\n| --------------------- | --------- | --------------------------------------------------------------------- | ----------------------------------------- |\n| FeedType              | Atom      | RSS2                                                                  | RSS1                                      |\n| Id                    | Id        | Link or DC:URI                                                        | Link or DC:URI                            |\n| Title                 | Title     | Title or DC:Title                                                     | Title or DC:Title                         |\n| Description           | Subtitle  | Description or DC:Description                                         | Description or DC:Description             |\n| Links                 | Links     | Link, DC:URI                                                          | Link or DC:URI                            |\n| Image                 | Logo      | Image                                                                 | Image                                     |\n| Icon                  | Icon      | -                                                                     | -                                         |\n| Language              | N/A       | Language or DC:Language                                               | DC:Language                               |\n| Created               | Updated   | LastBuildDate or DC:Created or PubDate or DC:DateSubmitted or DC:Date | DC:Created or DC:DateSubmitted or DC:Date |\n| Published             | Updated   | PubDate or DC:DateSubmitted or DC:Date                                | DC:DateSubmitted or DC:Date               |\n| UpdateDate            | Updated   | LastBuildDate or DC:Date                                              | DC:Date                                   |\n| Generator             | Generator | Generator                                                             | -                                         |\n| Ttl                   | -         | Ttl                                                                   | -                                         |\n| Categories            | Category  | -                                                                     | -                                         |\n| Author                | Author    | WebMaster or DC:Creator                                               | DC:Creator                                |\n| Copyright             | -         | Copyright or DC:Rights                                                | DC:Rights                                 |\n| SkipDays              | -         | SkipDays                                                              | -                                         |\n| SkipHours             | -         | SkipHours                                                             | -                                         |\n| Docs                  | -         | Docs                                                                  | -                                         |\n| Dublin Core Namespace | -         | All Dublin Core fields                                                | All Dublin Core fields                    |\n| Slash Namespace       | -         | -                                                                     | All Slash fields                          |\n\n### Entries/Items\n\n| Feed                  | Atom                                          | RSS2                                   | RSS                           |\n| --------------------- | --------------------------------------------- | -------------------------------------- | ----------------------------- |\n| Id                    | Id                                            | Guid or Link or DC:URI                 | DC:URI or Link                |\n| Author                | Author                                        | Author or DC:Creator                   | DC:Creator                    |\n| Title                 | Title                                         | Title or DC:Title                      | Title or DC:Title             |\n| Description           | Summary                                       | Description or DC:Description          | Description or DC:Description |\n| Content               | Content                                       | Content:Encoded                        | -                             |\n| Links                 | Links, feedburner:origlink, Href, (Id if URL) | Href                                   | Link, DC:URI                  |\n| Attachments           | Links (marked as enclosure)                   | Enclosure                              | -                             |\n| Published             | Published                                     | DC:DateSubmitted or PubDate or DC:Date | DC:DateSubmitted or DC:Date   |\n| Updated               | Updated                                       | PubDate                                | DC:DateSubmitted or DC:Date   |\n| Categories            | Category                                      | Category                               | -                             |\n| Contributors          | Contributors                                  | DC:Contributor                         | DC:Contributor                |\n| Comments              | -                                             | Comments                               | -                             |\n| Source                | Source                                        | -                                      | -                             |\n| Media Namespace       | -                                             | All Media fields                       | -                             |\n| Dublin Core Namespace | -                                             | All Dublin Core fields                 | All Dublin Core fields        |\n| Slash Namespace       | -                                             | -                                      | All Slash fields              |\n\n## Development\n\n### Local sample parsing\n\nUsing Denon\n\n```shell\ndenon start\n```\n\nUsing Deno\n\n```shell\ndeno run --allow-read dev.ts atom\n```\n\n### Testing\n\nUsing Denon\n\n```shell\ndenon test\n```\n\nUsing Deno\n\n```shell\ndeno test --allow-read\n```\n\n### Benchmark\n\nUsing Denon\n\n```shell\ndenon benchmark\n```\n\nUsing Deno\n\n```shell\ndeno bench --allow-read bench.ts\n```\n\n### Memory footprint test\n\nUsing Denon\n\n```shell\ndenon memory\n```\n\nUsing Deno\n\n```shell\ndeno run --allow-read dev_memory_usage.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelporttila%2Frss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikaelporttila%2Frss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelporttila%2Frss/lists"}