sig
type date = Netdate.t
val string_of_date : ?fmt:string -> Rss.date -> string
type email = string
type pics_rating = string
type skip_hours = int list
type skip_days = int list
type url = Neturl.url
type category = { cat_name : string; cat_domain : Rss.url option; }
type image = {
image_url : Rss.url;
image_title : string;
image_link : Rss.url;
image_height : int option;
image_width : int option;
image_desc : string option;
}
type text_input = {
ti_title : string;
ti_desc : string;
ti_name : string;
ti_link : Rss.url;
}
type enclosure = {
encl_url : Rss.url;
encl_length : int;
encl_type : string;
}
type guid = Guid_permalink of Rss.url | Guid_name of string
type source = { src_name : string; src_url : Rss.url; }
type cloud = {
cloud_domain : string;
cloud_port : int;
cloud_path : string;
cloud_register_procedure : string;
cloud_protocol : string;
}
type 'a item_t = {
item_title : string option;
item_link : Rss.url option;
item_desc : string option;
item_pubdate : Rss.date option;
item_author : Rss.email option;
item_categories : Rss.category list;
item_comments : Rss.url option;
item_enclosure : Rss.enclosure option;
item_guid : Rss.guid option;
item_source : Rss.source option;
item_data : 'a option;
}
type namespace = string * string
type ('a, 'b) channel_t = {
ch_title : string;
ch_link : Rss.url;
ch_desc : string;
ch_language : string option;
ch_copyright : string option;
ch_managing_editor : Rss.email option;
ch_webmaster : Rss.email option;
ch_pubdate : Rss.date option;
ch_last_build_date : Rss.date option;
ch_categories : Rss.category list;
ch_generator : string option;
ch_cloud : Rss.cloud option;
ch_docs : Rss.url option;
ch_ttl : int option;
ch_image : Rss.image option;
ch_rating : Rss.pics_rating option;
ch_text_input : Rss.text_input option;
ch_skip_hours : Rss.skip_hours option;
ch_skip_days : Rss.skip_days option;
ch_items : 'b Rss.item_t list;
ch_data : 'a option;
ch_namespaces : Rss.namespace list;
}
type item = unit Rss.item_t
type channel = (unit, unit) Rss.channel_t
val item :
?title:string ->
?link:Rss.url ->
?desc:string ->
?pubdate:Rss.date ->
?author:Rss.email ->
?cats:Rss.category list ->
?comments:Rss.url ->
?encl:Rss.enclosure ->
?guid:Rss.guid -> ?source:Rss.source -> ?data:'a -> unit -> 'a Rss.item_t
val channel :
title:string ->
link:Rss.url ->
desc:string ->
?language:string ->
?copyright:string ->
?managing_editor:Rss.email ->
?webmaster:Rss.email ->
?pubdate:Rss.date ->
?last_build_date:Rss.date ->
?cats:Rss.category list ->
?generator:string ->
?cloud:Rss.cloud ->
?docs:Rss.url ->
?ttl:int ->
?image:Rss.image ->
?rating:Rss.pics_rating ->
?text_input:Rss.text_input ->
?skip_hours:Rss.skip_hours ->
?skip_days:Rss.skip_days ->
?data:'a ->
?namespaces:Rss.namespace list ->
'b Rss.item_t list -> ('a, 'b) Rss.channel_t
val compare_item :
?comp_data:('a -> 'a -> int) -> 'a Rss.item_t -> 'a Rss.item_t -> int
val copy_item : 'a Rss.item_t -> 'a Rss.item_t
val copy_channel : ('a, 'b) Rss.channel_t -> ('a, 'b) Rss.channel_t
val keep_n_items : int -> ('a, 'b) Rss.channel_t -> ('a, 'b) Rss.channel_t
val sort_items_by_date : 'a Rss.item_t list -> 'a Rss.item_t list
val merge_channels :
('a, 'b) Rss.channel_t ->
('a, 'b) Rss.channel_t -> ('a, 'b) Rss.channel_t
type xmltree = E of Xmlm.tag * Rss.xmltree list | D of string
val xml_of_source : Xmlm.source -> Rss.xmltree
exception Error of string
type ('a, 'b) opts
val make_opts :
?schemes:(string, Neturl.url_syntax) Hashtbl.t ->
?base_syntax:Neturl.url_syntax ->
?read_channel_data:(Rss.xmltree list -> 'a option) ->
?read_item_data:(Rss.xmltree list -> 'b option) ->
unit -> ('a, 'b) Rss.opts
val default_opts : (unit, unit) Rss.opts
val channel_t_of_file :
('a, 'b) Rss.opts -> string -> ('a, 'b) Rss.channel_t * string list
val channel_t_of_string :
('a, 'b) Rss.opts -> string -> ('a, 'b) Rss.channel_t * string list
val channel_t_of_channel :
('a, 'b) Rss.opts ->
Pervasives.in_channel -> ('a, 'b) Rss.channel_t * string list
val channel_t_of_xmls :
('a, 'b) Rss.opts ->
Rss.xmltree list -> ('a, 'b) Rss.channel_t * string list
val channel_of_file : string -> Rss.channel * string list
val channel_of_string : string -> Rss.channel * string list
val channel_of_channel : Pervasives.in_channel -> Rss.channel * string list
type 'a data_printer = 'a -> Rss.xmltree list
val print_channel :
?channel_data_printer:'a Rss.data_printer ->
?item_data_printer:'b Rss.data_printer ->
?indent:int ->
?date_fmt:string ->
?encoding:string -> Format.formatter -> ('a, 'b) Rss.channel_t -> unit
val print_file :
?channel_data_printer:'a Rss.data_printer ->
?item_data_printer:'b Rss.data_printer ->
?indent:int ->
?date_fmt:string ->
?encoding:string -> string -> ('a, 'b) Rss.channel_t -> unit
end