@promistream/parse-rss

0.1.0 • Public • Published

@promistream/parse-rss

Transform stream that parses an RSS file into a list of items (posts). Currently only supports 'plain' RSS, like is used for blogs.

Unfamiliar with Promistreams?

Promistreams are universal, composable streams that interoperate with other streaming systems such as Node streams and asynchronous generators.

Have a look at the Promistream documentation to learn more about how they work, and how to use them!

Example

See the example.js in the repository/package.

Future plans

This is currently a very rudimentary implementation. Some additional functionality is planned for a future release:

  • Supporting Media RSS
  • Also providing the feed metadata (eg. what site the feed is for)

API

parseRSS()

Returns a new transform stream that accepts an RSS file stream (as a string) and produces feed items. If your upstream produces bytes instead of strings, you should use @promistream/decode-string before this stream.

The produced items have the following shape:

{
	title: String,
	description: String, // The post body
	pubDate: Date,
	link: String, // The canonical URL for the post
	guid: {
		value: String,
		isPermaLink: Boolean
	}
}

Note that any of these properties may be absent if the source RSS does not specify them!

Changelog

0.1.0 (February 9, 2025)

Initial release.

Readme

Keywords

Package Sidebar

Install

npm i @promistream/parse-rss

Weekly Downloads

0

Version

0.1.0

License

WTFPL OR CC0-1.0

Unpacked Size

6.65 kB

Total Files

5

Last publish

Collaborators

  • joepie91