5 author = s[:author] ? (s[:author] + " ") : ""
6 abt = s[:category] ? "about #{s[:category]} " : ""
7 line1 = "%{handle}%{date}%{author}blogged %{abt}at %{link}"
8 line2 = "%{handle}%{title} - %{desc}"
9 make_stream(line1, line2, s, :author => author, :abt => abt)
12 rss_type :forum do |s|
13 author = s[:author] ? (s[:author] + " ") : ""
14 abt = s[:category] ? "on #{s[:category]} " : ""
15 line1 = "%{handle}%{date}%{author}posted %{abt}at %{link}"
16 line2 = "%{handle}%{title} - %{desc}"
17 make_stream(line1, line2, s, :author => author, :abt => abt)
21 author = s[:author].sub(/@\S+?\s*>/, "@...>") + " " if s[:author]
22 line1 = "%{handle}%{date}%{author}committed %{title}%{at}%{link}"
23 make_stream(line1, nil, s, :author => author)
26 rss_type :gmane do |s|
27 line1 = "%{handle}%{date}Message %{title} sent by %{author}. %{desc}"
28 make_stream(line1, nil, s)
31 rss_type :headlines do |s|
32 line1 = (s[:handle].empty? ? "%{date}" : "%{handle}") << "%{title}"
33 make_stream(line1, nil, s)
37 line1 = "%{handle}%{date}%{title}%{at}%{link}" % s
38 line2 = "%{handle}%{date}%{desc}" % s
39 make_stream(line1, line2, s)
42 rss_type :photoblog do |s|
43 author = s[:author] ? (s[:author] + " ") : ""
44 abt = s[:category] ? "under #{s[:category]} " : ""
45 line1 = "%{handle}%{date}%{author}added an image %{abt}at %{link}"
46 line2 = "%{handle}%{title} - %{desc}"
47 make_stream(line1, line2, s, :author => author, :abt => abt)
51 author = s[:author].sub(/@\S+?\s*>/, "@...>") + ": " if s[:author]
52 line1 = "%{handle}%{date}%{author}%{title}%{at}%{link}"
54 unless s[:item].title =~ /^(?:Changeset \[(?:[\da-f]+)\]|\(git commit\))/
55 line2 = "%{handle}%{date}%{desc}"
57 make_stream(line1, line2, s, :author => author)
61 line1 = "%{handle}%{date}%{title}%{at}%{link}"
62 line1 << "has been edited by %{author}. %{desc}"
63 make_stream(line1, nil, s)
67 dept = "(from the #{s[:item].slash_department} dept) " rescue nil
68 sec = " in section #{s[:item].slash_section}" rescue nil
69 line1 = "%{handle}%{date}%{dept}%{title}%{at}%{link} "
70 line1 << "(posted by %{author}%{sec})"
71 make_stream(line1, nil, s, :dept => dept, :sec => sec)