Created
August 13, 2014 20:53
-
-
Save amirmc/48e493194d6452ab8c4e to your computer and use it in GitHub Desktop.
Merging atom feeds - Line 15 does not type-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Http_client.Convenience | |
open Syndic | |
let feed_urls = | |
["http://amirchaudhry.com/atom.xml"; | |
"http://nymote.org/atom.xml"] | |
let all_feeds feed_urls = | |
let parse_one_feed feed = | |
let raw_feed = http_get feed in | |
let input = Xmlm.make_input (`String (0, raw_feed)) in | |
Atom.parse input in | |
List.map parse_one_feed feed_urls | |
let merged_feed = Atom.aggregate all_feeds | |
let () = | |
let fh = open_out "combined_feed.txt" in | |
Atom.output merged_feed (`Channel fh); | |
close_out fh |
Author
amirmc
commented
Aug 13, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment