{"repo":"igrishaev/remus","free":true,"listed":false,"github":"https://github.com/igrishaev/remus","clone":"git clone https://github.com/igrishaev/remus.git","description":"Attentive RSS/Atom feed parser for Clojure","language":"Clojure","stars":71,"topics":["clojure","rss","atom","feed","http"],"license":"Unlicense","category":"productivity","readme_excerpt":"Remus [rome-site]: https://rometools.github.io/rome/ [http-client]: https://github.com/babashka/http-client An attentive RSS and Atom feed parser for Clojure. It's built on top of well-known and powerful [ROME Tools][rome-site] Java library. Remus deals with weird encoding and non-standard XML tags. The library fetches as much information from a feed as possible. Table of Contents - Benefits - Installation - Usage Parsing a URL Parsing a source - HTTP tweaks Error cases Saving extra data - Non-standard tags - Encoding issues - Misc Benefits - Gets all the known fields from a feed and turns them into plain Clojure data structures; - relies on the built-in Java HTTP client (via the [babashka-http][http-client] library); - supports HTTP2 protocol; - preserves non-standard XML tags for further processing (see an example below). Installation Leiningen/Boot: Clojure CLI/deps.edn Usage The library provides a one-word top namespace remus so it's easier to remember. Parsing a URL Let's parse Planet Clojure: The variable result is a map of two keys: :response and :feed . These are an HTTP response and a parsed feed. Below, there is a truncated version of a feed: As for HTTP response, it's a data structure returned by an HTTP client. You might need it to save some of HTTP headers for further requests (see below). Parsing a source The function parse accepts any kind of a source that can be coerced to an input stream: a file, a reader, and so on: clojure (remus/parse \"/path/to/file/xml\" (","default_branch":null,"files":null,"tree":[],"storefront":"/r/igrishaev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/igrishaev/remus/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}