DRSS

Ugly RSS interface for D.
git clone git://xatko.vsos.ethz.ch/DRSS.git
Log | Files | Refs | Submodules

commit af0c12a4ab17d416b1a405d0f1e65de36b98bded
parent 829bc01209e57ceac2d2e2182266293b612d3c2a
Author: Dominik Schmidt <das1993@hotmail.com>
Date:   Sat,  1 Aug 2015 12:33:00 +0200

Add news function, which returns a range with all the new entries.

Diffstat:
drss/rss.d | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/drss/rss.d b/drss/rss.d @@ -5,6 +5,7 @@ import std.container.slist; import std.datetime; import std.algorithm; import std.string; +import std.range; import kxml.xml; struct Entry{ enum Type{ @@ -90,6 +91,10 @@ abstract class DRSS(T=Entry){ } } + @property auto news(){ + return entries[].take(new_entries); + } + public ubyte[] fetch(){ debug(RSS) writeln("Updateing"); auto h=HTTP();