package yocaml_syndication

  1. Overview
  2. Docs

Implementation of the RSS1 specification, documented here: specs. RSS2 or Atom are to be preferred, but RSS1 is present for historical reasons (if a user does not want to migrate his feed).

As this specification is not widely recommended, no additional modules are implemented.

Types

Types that briefly describe the RSS 1 specification. As the channel is closely linked to the description of a feed, the module does not export a channel type, as it is constructed when the feed is built.

type image

Type describing an image associated with the feed.

type item

Type describing an item.

Construction of elements

val image : title:string -> link:string -> url:string -> image
val item : title:string -> link:string -> description:string -> item

Building a feed

val feed : ?encoding:string -> ?standalone:bool -> ?image:image -> ?textinput:Text_input.t -> title:string -> url:string -> link:string -> description:string -> ('a -> item) -> 'a list -> Xml.t

Build a RSS1`feed. url is the rdf identifier of the feed (usually the url of the feed) and link is the link of the website attached to the feed.

Arrows for building a feed

val from : ?encoding:string -> ?standalone:bool -> ?image:image -> ?textinput:Text_input.t -> title:string -> url:string -> link:string -> description:string -> ('a -> item) -> ('a list, string) Yocaml.Task.t

An arrow that build a feed that from an arbitrary list.

val from_articles : ?encoding:string -> ?standalone:bool -> ?image:image -> ?textinput:Text_input.t -> title:string -> feed_url:string -> site_url:string -> description:string -> unit -> ((Yocaml.Path.t * Yocaml.Archetype.Article.t) list, string) Yocaml.Task.t

An arrow that build a feed that fit with Yocaml.Archetype.Articles.fetch.

OCaml

Innovation. Community. Security.