{"id":15396866,"url":"https://github.com/z0al/unread","last_synced_at":"2025-04-16T00:23:03.234Z","repository":{"id":34222357,"uuid":"169750214","full_name":"z0al/unread","owner":"z0al","description":"A package for parsing RSS and Atom feeds","archived":false,"fork":false,"pushed_at":"2023-03-27T14:05:25.000Z","size":1662,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T08:55:36.691Z","etag":null,"topics":["atom-feed","feed","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/z0al.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":"2019-02-08T14:52:15.000Z","updated_at":"2023-12-27T10:42:15.000Z","dependencies_parsed_at":"2024-10-13T08:30:48.339Z","dependency_job_id":"1156fd0c-bfdb-45b7-90f8-aa21cba55137","html_url":"https://github.com/z0al/unread","commit_stats":{"total_commits":120,"total_committers":2,"mean_commits":60.0,"dds":0.008333333333333304,"last_synced_commit":"ef38025e1634dde5f8ed16b5031a7a0eec2d75a4"},"previous_names":["z0al/feedify"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Funread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Funread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Funread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0al%2Funread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z0al","download_url":"https://codeload.github.com/z0al/unread/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248753307,"owners_count":21156248,"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-feed","feed","parser","rss"],"created_at":"2024-10-01T15:35:10.960Z","updated_at":"2025-04-16T00:23:03.198Z","avatar_url":"https://github.com/z0al.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unread\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors) [![Build](https://img.shields.io/travis/z0al/unread.svg)](https://travis-ci.org/z0al/unread) [![Bundlephobia](https://img.shields.io/bundlephobia/minzip/unread.svg)](https://bundlephobia.com/result?p=unread)\n\n[![NPM](https://nodei.co/npm/unread.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/unread/)\n\n\u003e A package for parsing RSS 2.0, Atom 1.0. Works on both Node.js and the browser.\n\n## Features\n\n- **Small** footprint\n- **Query** attributes helper (see below)\n- **Cross-platform** works on browser and Node.js\n- **TypeScript** ready\n\n## Installation\n\n```sh\nnpm add unread\n```\n\n## Usage\n\n```javascript\nimport { parse } from 'unread';\n\nconst res = await fetch('https://overreacted.io/rss.xml');\nconst rss = await res.text();\n\nconst output = await parse(rss);\n\n// We support common attributes\nconst { feed, items } = output;\nconsole.log(feed.title());\nconsole.log(feed.feedLink());\n\n// And you can also query custom ones (as long as we support that namespace)\nconsole.log(item[0].get(['author', 'dc:creator'])); // returns first match or undefined\nconsole.log(item[0].getMany(['atom:link[ref=enclosure]'])); // Array of nodes\n```\n\n## Supported namespaces\n\nWe support the followings XML namespaces:\n\n- `http://www.w3.org/2005/Atom` (atom)\n- `http://purl.org/rss/1.0/modules/content/` (content)\n- `http://purl.org/dc/elements/1.1/` (dc)\n- `http://purl.org/dc/elements/1.0/` (dc)\n- `http://www.itunes.com/dtds/podcast-1.0.dtd` (itunes)\n- `http://search.yahoo.com/mrss/` (media)\n- `http://www.w3.org/1999/xhtml` (xhtml)\n- `http://www.w3.org/XML/1998/namespace` (xml)\n\n## Mapping\n\n### Feed\n\n| Helper        | RSS                                                      | Atom                          |\n| ------------- | -------------------------------------------------------- | ----------------------------- |\n| id()          |                                                          | /feed/id                      |\n| title()       | /rss/channel/title\u003cbr\u003e/rss/channel/dc:title              | /feed/title                   |\n| description() | /rss/channel/description\u003cbr\u003e/rss/channel/itunes:subtitle | /feed/subtitle                |\n| links()       | /rss/channel/link                                        | /feed/link/@href              |\n| feedURL()     | /rss/channel/atom:link[@rel=\"self\"]/@href                | /feed/link[@rel=\"self\"]/@href |\n| updated()     | /rss/channel/lastBuildDate\u003cbr\u003e/rss/channel/dc:date       | /feed/updated                 |\n| published()   | /rss/channel/pubDate                                     |                               |\n| language()    | /rss/channel/language\u003cbr\u003e/rss/channel/dc:language        | /feed/@xml:lang               |\n| image()       | /rss/channel/image\u003cbr\u003e/rss/channel/itunes:image          | /feed/logo                    |\n| generator()   | /rss/channel/generator                                   | /feed/generator               |\n\n### Item\n\n| Helper        | RSS                                                               | Atom                               |\n| ------------- | ----------------------------------------------------------------- | ---------------------------------- |\n| id()          | /rss/channel/item/guid                                            | /feed/entry/id                     |\n| title()       | /rss/channel/item/title\u003cbr\u003e/rss/channel/item/dc:title             | /feed/entry/title                  |\n| description() | /rss/channel/item/description\u003cbr\u003e/rss/channel/item/dc:description | /feed/entry/summary                |\n| content()     | /rss/channel/item/content:encoded                                 | /feed/entry/content                |\n| links()       | /rss/channel/item/link                                            | /feed/entry/@href                  |\n| updated()     | /rss/channel/item/dc:date                                         | /feed/entry/updated                |\n| published()   | /rss/channel/item/pubDate\u003cbr\u003e/rss/channel/item/dc:date            | /feed/entry/published              |\n| image()       | /rss/channel/item/media:thumbnail                                 |                                    |\n| enclosures()  | /rss/channel/item/enclosure                                       | /feed/entry/link[@rel=”enclosure”] |\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://ahmed.sd\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12673605?v=4\" width=\"100px;\" alt=\"Ahmed T. Ali\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAhmed T. Ali\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Ahmed T. Ali/unread/commits?author=z0al\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/Ahmed T. Ali/unread/commits?author=z0al\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-z0al\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/Ahmed T. Ali/unread/commits?author=z0al\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## Credits\n\n- [Louis-Dominique Dubeau](https://github.com/lddubeau) for their work on [saxes](https://github.com/lddubeau/saxes). We use `saxes` to parse XML strings.\n- [Dan MacTough](https://github.com/danmactough) for their work on [node-feedparser](https://github.com/danmactough/node-feedparser). Our work is heavily inspired by `feedparser`.\n- [mmcdole](https://github.com/mmcdole) for their work on [gofeed](https://github.com/mmcdole/gofeed). We adopted `gofeed` fields mapping.\n\n## License\n\nMIT © Ahmed T. Ali\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0al%2Funread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz0al%2Funread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0al%2Funread/lists"}