~chrisppy/hare-rss

d51edc00b01803f518bb1bfbf8a664a11dbe9485 — Chris Palmer 2 months ago 251fdfe main
ignore rating, textInput, source, and cloud

Signed-off-by: Chris Palmer <chris@red-oxide.org>
2 files changed, 17 insertions(+), 0 deletions(-)

M format/rss/+test.ha
M format/rss/scan.ha
M format/rss/+test.ha => format/rss/+test.ha +9 -0
@@ 36,6 36,14 @@ use strings;
			<height>400</height>
			<width>144</width>
		</image>
		<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="myCloud.rssPleaseNotify" protocol="xml-rpc" />
		<textInput>
			<title>Title</title>
			<description>description</description>
			<name>name</name>
			<link>link</link>
		</textInput>
		<rating>rating</rating>
		<item>
			<title>The Engine That Does More</title>
			<link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>


@@ 46,6 54,7 @@ use strings;
			<author>lawyer@boyer.net (Lawyer Boyer)</author>
			<comments>http://ekzemplo.com/entry/4403/comments</comments>
			<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
			<source url="http://www.tomalak.org/links2.xml">Tomalak's Realm</source>
		</item>
	</channel>
</rss>`));

M format/rss/scan.ha => format/rss/scan.ha +8 -0
@@ 43,6 43,8 @@ fn scan_rss(par: *xml::parser) (rss | error) = {
				continue;
			case "category" =>
				append(r.categories, scan_category(par)?);
			case "cloud" =>
				until(par, "cloud")?;
			case "description" =>
				r.description = scan_text(par)?;
			case "docs" =>


@@ 67,6 69,10 @@ fn scan_rss(par: *xml::parser) (rss | error) = {
				append(r.skip_days, scan_text(par)?);
			case "skipHours" =>
				append(r.skip_hours, scan_text(par)?);
			case "rating" =>
				until(par, "rating")?;
			case "textInput" =>
				until(par, "textInput")?;
			case "title" =>
				r.title = scan_text(par)?;
			case "ttl" =>


@@ 116,6 122,8 @@ fn scan_item(par: *xml::parser) (item | error) = {
				it.link = scan_text(par)?;
			case "pubDate" =>
				it.pub_date = scan_text(par)?;
			case "source" =>
				until(par, "source")?;
			case "title" =>
				it.title = scan_text(par)?;
			case =>