Added --dir option for people who want two lots of rawdog state (for two
sets of feeds, for instance).
+Added "maxage" config option for people who want "only items added in
+the last hour", and made it possible to disable maxarticles by setting
+it to 0.
+
- rawdog 1.2
Updated feedparser to 2.5.2, which fixes a bug that was making rawdog
# directory.
# The maximum number of articles to show on the generated page.
+# Set this to 0 for no limit.
maxarticles 200
+# The maximum age in minutes of articles to show on the generated page.
+# Set this to 0 for no limit.
+maxage 0
+
# The format to write day headings in. (See "man strftime" if you want to
# change this.)
dayformat %A, %d %B
"feedslist" : [],
"outputfile" : "output.html",
"maxarticles" : 200,
+ "maxage" : 0,
"dayformat" : "%A, %d %B %Y",
"timeformat" : "%I:%M %p",
"userefresh" : 0,
self["outputfile"] = l[1]
elif l[0] == "maxarticles":
self["maxarticles"] = int(l[1])
+ elif l[0] == "maxage":
+ self["maxage"] = int(l[1])
elif l[0] == "dayformat":
self["dayformat"] = l[1]
elif l[0] == "timeformat":
return i
return cmp(a.hash, b.hash)
articles.sort(compare)
- articles = articles[:config["maxarticles"]]
+ if config["maxarticles"] != 0:
+ articles = articles[:config["maxarticles"]]
f = StringIO()
dw = DayWriter(f, config)
for article in articles:
+ age = (now - article.added) / 60
+ if config["maxage"] != 0 and age > config["maxage"]:
+ break
+
dw.time(article.added)
feed = self.feeds[article.feed]