package yocaml_syndication

  1. Overview
  2. Docs

Implementation of the RSS2 specification, documented here: specs.

Types

Types that briefly describe the RSS 2 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 days =
  1. | Mon
  2. | Tue
  3. | Wed
  4. | Thu
  5. | Fri
  6. | Sat
  7. | Sun

Type describing days (for skip days).

type cloud_protocol =
  1. | Xml_rpc
  2. | Soap
  3. | Http_post
type cloud
type enclosure
type guid
type guid_strategy

Type describing the guid inference attribute.

type source
type image

Construction of elements

val cloud : protocol:cloud_protocol -> domain:string -> port:int -> path:string -> register_procedure:string -> cloud
val enclosure : url:string -> media_type:Media_type.t -> length:int -> enclosure
val guid_from_title : guid_strategy

Infer GUID from the item title.

Infer GUID from the item url.

val guid : is_permalink:bool -> string -> guid_strategy
val source : title:string -> url:string -> source
val image : title:string -> link:string -> ?description:string -> ?width:int -> ?height:int -> url:string -> unit -> image
val item : ?author:Person.t -> ?categories:Category.t list -> ?comments:string -> ?enclosure:enclosure -> ?guid:guid_strategy -> ?pub_date:Datetime.t -> ?source:source -> title:string -> link:string -> description:string -> unit -> item

Building a feed

val feed : ?encoding:string -> ?standalone:bool -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?last_build_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> link:string -> url:string -> description:string -> ('a -> item) -> 'a list -> Xml.t

Arrows for building a feed

val from : ?encoding:string -> ?standalone:bool -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?last_build_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> site_url:string -> feed_url: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 -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> site_url:string -> feed_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. link is concatenate with the given path to compute the link of an item.

OCaml

Innovation. Community. Security.