Library
Module
Module type
Parameter
Class
Class type
type html = Nethtml.document list
type feed =
| Atom of Syndic.Atom.feed
| Rss2 of Syndic.Rss2.channel
| Broken of string
The feed is either an Atom or Rss2. If the feed is Broken message
, then the message
gives the reason.
Feed information.
type post = {
title : string;
link : Uri.t option;
date : Syndic.Date.t option;
contributor : contributor;
email : string;
desc : html;
}
Each post has a title, author, email and content (desc). The link, if available, points to the location of the original post.
val get_posts : ?n:int -> ?ofs:int -> string -> post list
get_posts n ofs fname
fetches a deduplicated list of posts, sorted based on the date, with the lastest post appearing first. The optional argument n
fetches the first n
posts. By default, all the posts are fetched. ofs
represents the offset into the post list. For example, get_posts 10 10
fetches the posts 10 to 20.
fname
is the input file with the list of feeds. The format is:
<feed_name>|<feed_url> <feed_name>|<feed_url> ...