Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
146 lines (123 sloc) 4.18 KB
[% DEFAULT file = 'feeds.yaml';
USE date;
USE YAML;
sources = YAML.undumpfile(file);
PROCESS opml.tt | redirect('newsfeeds.opml') -%]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>UK National Newspaper RSS Feeds</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="/js/display.js"></script>
<script>
function show_hide (select) {
if (select.value == "all") {
show_all('source');
} else {
show_one('source', select.value);
}
}
function filter (evt) {
evt = (evt) ? evt : ((window.event) ? event : null);
var charCode = (evt.charCode) ? evt.charCode :
((evt.which) ? evt.which : evt.keyCode);
var elem = (evt.target) ? evt.target :
((evt.srcElement) ? evt.srcElement : null);
var text = elem.value;
if (charCode == 13) {
return false;
}
if (charCode == 46) {
return false;
}
if (charCode == 8) {
text = text.slice(0, -1);
} else {
text = text + String.fromCharCode(charCode);
}
filter_it(text);
}
function filter_it (text) {
var regex = new RegExp(text, "i");
var items = document.getElementsByTagName('li');
for (var i = 0; i < items.length; i++) {
if (items[i].childNodes[0].text.match(regex)) {
items[i].style.display = 'list-item';
} else {
items[i].style.display = 'none';
}
}
}
</script>
</head>
<body>
<h1>UK National Newspaper RSS Feeds</h1>
<p>This page contains a list of UK newspaper<sup><a id="fn1" href="#">[1] <span>Ok. Yes, I included the BBC which isn't a newspaper. It's my page and I make the rules.</span></a></sup> RSS feeds. For more
information about what RSS is and how to use it, see
<a href="http://mag-sol.com/Articles/article.cgi?art=rss">this
article</a>.</p>
<p>All of these feeds are almost certainly covered by terms and
conditions which you should read by following the "more information"
link for each source.</p>
<p>If you know of any other feeds produced by a UK newspaper, then I'd
love to know about it. Please <a href="mailto:dave@dave.org.uk">let
me know</a>.</p>
<p><b>Update:</b> Added OPML files. There's one that contains everything
and one for each individual source.</p>
<p>Choose a source: <select onchange="show_hide(this)">
<option value="all">All Sources</option>
[% FOREACH source IN sources -%]
<option value="[% source.code %]">[% source.desc %]</option>
[% END -%]
</select>
and/or filter the list:
<input type="text" onkeypress="filter(event)" onchange="filter_it(this.value)" id="filter" /></p>
<p><a href="newsfeeds.opml">OPML</a></p>
[% FOREACH source IN sources;
opml = source.code _ '.opml';
PROCESS one_opml.tt | redirect(opml) -%]
<div class="source" id="[% source.code %]">
<h2>[% source.desc %]</h2>
<p><a href="[% source.start %]">More information</a> /
<a href="[% source.code %].opml">OPML</a></p>
<ul>
[% FOREACH feed IN source.feeds -%]
<li><a href="[% feed.url %]">[% feed.desc %]</a></li>
[% END -%]
</ul>
</div>
[% END -%]
<div id="credits">
Page created by <a href="http://dave.org.uk/">Dave Cross</a>
using <a href="http://svn.mag-sol.com/newsfeeds/">newsfeeds</a>
at [% date.format(date.now, '%Y-%m-%d %H:%M') %]
<br /><a href="feeds.yaml">Raw data</a>
(in <a href="http://www.yaml.org/">YAML</a> format).
</div>
<div id="ads">
<script type="text/javascript"><!--
google_ad_client = "pub-3663319204757145";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text";
google_ad_channel ="2532784732";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "999999";
google_color_url = "6666FF";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-56332-2";
urchinTracker();
</script>
</body>
</html>
Something went wrong with that request. Please try again.