package yocaml_syndication

  1. Overview
  2. Docs

Implementation of the OPML (1 and 2) specification documented here:

In fact, a document complying with the OPML2 specification is broadly compatible with specification 1, so it is recommended to use specification 2.

Types

type t

Describes an OPML feed.

type outline

Describes an Outline. An outline is an XML element containing at least one required attribute, text, and zero or more additional attributes. An outline may contain zero or more outline sub-elements. No attribute may be repeated within the same outline element.

Construction of elements

val outline : ?typ:string -> ?is_comment:bool -> ?is_breakpoint:bool -> ?xml_url:string -> ?html_url:string -> ?attr:Xml.Attr.t list -> ?categories:string list -> ?title:string -> text:string -> outline list -> outline

Describes an Outline. An outline is an XML element containing at least one required attribute, text, and zero or more additional attributes. An outline may contain zero or more outline sub-elements. No attribute may be repeated within the same outline element.

val inclusion : url:string -> text:string -> outline

Describes a special outlines that can be opened (or included) into an OPML reader.

val subscription : ?version:string -> ?description:string -> ?html_url:string -> ?language:string -> title:string -> feed_url:string -> unit -> outline

Describes a special outlines that describes a subscription to an RSS/ATOM feed.

val feed : ?title:string -> ?date_created:Datetime.t -> ?date_modified:Datetime.t -> ?owner:Person.t -> ?expansion_state:int list -> ?vert_scroll_state:int -> ?window_top:int -> ?window_left:int -> ?window_bottom:int -> ?window_right:int -> outline list -> t

Construct a feed of outlines associated with an Head element.

Generating OPML feeds

val to_opml2 : ?encoding:string -> ?standalone:bool -> t -> Xml.t

Generates an OPML stream in accordance with specification 2.

val to_opml1 : ?encoding:string -> ?standalone:bool -> t -> Xml.t

Arrows for building a feed

val from : ?title:string -> ?date_created:Datetime.t -> ?date_modified:Datetime.t -> ?owner:Person.t -> ?expansion_state:int list -> ?vert_scroll_state:int -> ?window_top:int -> ?window_left:int -> ?window_bottom:int -> ?window_right:int -> unit -> (outline list, t) Yocaml.Task.t

An arrow that build a feed that from a list of outlines.

val opml2_from : ?encoding:string -> ?standalone:bool -> ?title:string -> ?date_created:Datetime.t -> ?date_modified:Datetime.t -> ?owner:Person.t -> ?expansion_state:int list -> ?vert_scroll_state:int -> ?window_top:int -> ?window_left:int -> ?window_bottom:int -> ?window_right:int -> unit -> (outline list, string) Yocaml.Task.t

An arrow that build an OPML2 representation that from a list of outlines.

val opml1_from : ?encoding:string -> ?standalone:bool -> ?title:string -> ?date_created:Datetime.t -> ?date_modified:Datetime.t -> ?owner:Person.t -> ?expansion_state:int list -> ?vert_scroll_state:int -> ?window_top:int -> ?window_left:int -> ?window_bottom:int -> ?window_right:int -> unit -> (outline list, string) Yocaml.Task.t

An arrow that build an OPML1 representation that from a list of outlines.

OCaml

Innovation. Community. Security.