demo.lua: Example usage

Fri, 17 Sep 2010 14:43:38 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 17 Sep 2010 14:43:38 +0100
changeset 1
ee74a5e9419b
parent 0
319733864f05
child 2
c04d4fd34685

demo.lua: Example usage

demo.lua file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demo.lua	Fri Sep 17 14:43:38 2010 +0100
@@ -0,0 +1,11 @@
+require "feeds"
+
+local feed = feeds.open("http://planet.jabber.org/atom.xml");
+
+print(feed.title);
+print("");
+
+for _, entry in ipairs(feed) do
+	print(entry:get_child("title"):get_text());
+	print("", entry:get_child("link").attr.href);
+end

mercurial