Compare commits
17 Commits
5b48b91e99
...
I30-Series
Author | SHA1 | Date | |
---|---|---|---|
|
082ea4069d | ||
dfbb4a24db
|
|||
4e1d525e6e
|
|||
694c100bcf
|
|||
52a314f2a9
|
|||
b36293e52f
|
|||
02eb8313d3
|
|||
ff2ced6774
|
|||
0dc5a78dae
|
|||
9d0e8d403d
|
|||
5af4d93c8c
|
|||
cf001df9ec
|
|||
6d4f5f28c9
|
|||
17ef26642a
|
|||
91349eb504
|
|||
83c188465d
|
|||
41a18300eb
|
@@ -26,7 +26,7 @@ Generate two specific pages:
|
||||
`site-generator index about`
|
||||
|
||||
Generate the whole site:
|
||||
`site-generator ALL`
|
||||
`site-generator --all`
|
||||
|
||||
Generate pages based on the same template:
|
||||
`site-generator correspondent=1,3,5..10`
|
||||
|
14
public_html/will-my-show-be-of-interest-to-hackers.html
Normal file
14
public_html/will-my-show-be-of-interest-to-hackers.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||
<title>Will my show be of intrest to hackers ?</title>
|
||||
<style>
|
||||
p {font-size:100px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
YES !
|
||||
</p>
|
||||
|
||||
|
||||
</body><!-- If you are reading this then definately YES --></html>
|
@@ -8,6 +8,7 @@
|
||||
|
||||
site-generator [OPTION]... PAGE|PAGE=<comma separated list of ids>...
|
||||
|
||||
-a, --all generate all pages defined in configuration file
|
||||
-l, --list print list of configured pages
|
||||
-p, --preview print generated pages to standard out
|
||||
-q, --quiet suppress progress information while generating pages
|
||||
@@ -23,7 +24,7 @@
|
||||
site-generator index about
|
||||
|
||||
Generate the whole site:
|
||||
site-generator ALL
|
||||
site-generator --all
|
||||
|
||||
Generate pages based on the same template:
|
||||
site-generator correspondent=1,3,5..10
|
||||
@@ -92,33 +93,32 @@ exit main();
|
||||
sub main {
|
||||
|
||||
# Argument parsing
|
||||
my $all;
|
||||
my $preview;
|
||||
my $verbose;
|
||||
my $quiet;
|
||||
GetOptions(
|
||||
'all' => \$all,
|
||||
'list' => \&print_available_pages,
|
||||
'preview' => \$preview,
|
||||
'verbose' => \$verbose,
|
||||
'quiet' => \$quiet,
|
||||
) or pod2usage(1);
|
||||
pod2usage(1) unless @ARGV;
|
||||
pod2usage(1) unless @ARGV || $all;
|
||||
my (@page_args) = @ARGV;
|
||||
|
||||
if ($quiet) {
|
||||
$verbose = 'quiet';
|
||||
};
|
||||
|
||||
# Set flag indicating whether or not to generate all pages.
|
||||
# The flag is set to true if the special argument ALL is
|
||||
# passed into the generator
|
||||
my $ALL = grep { $_ eq 'ALL' } @page_args;
|
||||
|
||||
# Load config file
|
||||
read_config "site.cfg" => my %config;
|
||||
|
||||
my $tt = get_template_html($config{DBI});
|
||||
|
||||
if ($ALL) {
|
||||
# If command line option all is set, parse configuration file
|
||||
# for all pages
|
||||
if ($all) {
|
||||
@page_args = keys %config;
|
||||
|
||||
# Remove non page sections of the configuration file
|
||||
@@ -131,7 +131,13 @@ sub main {
|
||||
if (exists($config{$parsed_arg{'page'}})) {
|
||||
my $page_config = $config{$parsed_arg{'page'}};
|
||||
$page_config->{'page'} = $parsed_arg{'page'};
|
||||
$page_config->{'root_template'} = $config{root_template}{content};
|
||||
|
||||
# Set page's root_template to the default root_template if the
|
||||
# page root_template property is not set in the configuration file.
|
||||
if (exists $page_config->{'root_template'} == 0) {
|
||||
$page_config->{'root_template'} = $config{root_template}{content};
|
||||
}
|
||||
|
||||
if (exists $config{root_template}{baseurl}) {
|
||||
$page_config->{'baseurl'} = $config{root_template}{baseurl};
|
||||
}
|
||||
@@ -260,7 +266,7 @@ sub get_filename {
|
||||
else {
|
||||
$filename = $$config{'filename'};
|
||||
my $padded_index = "";
|
||||
if ($$config{'id'}) {
|
||||
if (exists $$config{'id'}) {
|
||||
$padded_index = sprintf("%04d", $$config{'id'});
|
||||
}
|
||||
$filename =~ s/\[id\]/$padded_index/;
|
||||
|
29
site.cfg
29
site.cfg
@@ -134,15 +134,38 @@ content: content-sitemap.tpl.html
|
||||
|
||||
[hpr_ogg]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_ogg.tpl.xml
|
||||
content: rss-hpr.tpl.xml
|
||||
filename: hpr_ogg.rss
|
||||
media_file_extension: ogg
|
||||
|
||||
[hpr_mp3]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_mp3.tpl.xml
|
||||
content: rss-hpr.tpl.xml
|
||||
filename: hpr_mp3.rss
|
||||
media_file_extension: mp3
|
||||
audio_mime_type: mpeg
|
||||
|
||||
[hpr_spx]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_spx.tpl.xml
|
||||
content: rss-hpr.tpl.xml
|
||||
filename: hpr_spx.rss
|
||||
media_file_extension: spx
|
||||
|
||||
[hpr_total_ogg]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_total.tpl.xml
|
||||
filename: hpr_total_ogg.rss
|
||||
media_file_extension: ogg
|
||||
|
||||
[hpr_total_mp3]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_total.tpl.xml
|
||||
filename: hpr_total_mp3.rss
|
||||
media_file_extension: mp3
|
||||
audio_mime_type: mpeg
|
||||
|
||||
[hpr_total_spx]
|
||||
root_template: rss.tpl.xml
|
||||
content: rss-hpr_total.tpl.xml
|
||||
filename: hpr_total_spx.rss
|
||||
media_file_extension: spx
|
||||
|
@@ -3,22 +3,22 @@
|
||||
<hr>
|
||||
<article>
|
||||
<header>
|
||||
<h3>welcome to hpr the community podcast</h3>
|
||||
<h3>Welcome to HPR the Community Podcast</h3>
|
||||
</header>
|
||||
<!--% USE date %-->
|
||||
<!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %-->
|
||||
<p>we started producing shows as <a href="/twat.php"><em>today with a techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to hpr then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="/calendar.php">released</a> in <strong>13</strong> days.</p>
|
||||
<h4>meet the team</h4>
|
||||
<p>We started producing shows as <a href="https://www.hackerpublicradio.org/twat.php"><em>Today with a Techie</em></a> on 2005-09-19, <!--% delta.0 %--> years, <!--% delta.1 %--> months, <!--% delta.2 %--> days ago. our shows are produced by <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">listeners</a> like you and can be on any <a href="<!--% absolute_path(baseurl) %-->eps/index.html">topic</a> that <strong>"are of interest to <a href="https://en.wikipedia.org/wiki/hacker_(hobbyist)">hackers</a>"</strong>. if you listen to HPR then please consider contributing one show a year. if you <a href="<!--% absolute_path(baseurl) %-->contribute.html">record</a> your show now it could be <a href="https://www.hackerpublicradio.org/calendar.php">released</a> in <strong>13</strong> days.</p>
|
||||
<h4>Meet the team</h4>
|
||||
<p>
|
||||
<audio controls preload="none">";
|
||||
<source src="../media/promos/all-hpr-hosts.ogg" type="audio/ogg" >
|
||||
<source src="../media/promos/all-hpr-hosts.mp3" type="audio/mpeg" >
|
||||
<source src="<!--% absolute_path(baseurl) %-->media/promos/all-hpr-hosts.ogg" type="audio/ogg" >
|
||||
<source src="<!--% absolute_path(baseurl) %-->media/promos/all-hpr-hosts.mp3" type="audio/mpeg" >
|
||||
</audio>
|
||||
</p>
|
||||
</article>
|
||||
<hr>
|
||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||
<h1>latest shows</h1>
|
||||
<h1>Latest Shows</h1>
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH latest_episodes IN DBI.query('
|
||||
SELECT
|
||||
@@ -49,7 +49,7 @@
|
||||
<br>Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(latest_episodes.hostid) %-->.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% display_explicit(latest_episodes.explicit) %--> and released under a <!--% latest_episodes.license %--> license. <br>
|
||||
<strong>Tags:</strong> <!--% latest_episodes.tags %--><em></em>.<br>
|
||||
<small>listen in <a href="local/hpr<!--% latest_episodes.id %-->.ogg">ogg</a>, <a href="local/hpr<!--% latest_episodes.id %-->.spx">spx</a>, or <a href="local/hpr<!--% latest_episodes.id %-->.mp3">mp3</a> format. <!--% show_series(latest_episodes.series, latest_episodes.seriesid) %-->
|
||||
<a href="eps.php?id=3628#comments">comments (0)</a></small>
|
||||
<a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(latest_episodes.id) %-->/index.html#comments">View comments.</a></small>
|
||||
</p>
|
||||
</header>
|
||||
<!--% latest_episodes.notes %-->
|
||||
|
@@ -16,7 +16,7 @@
|
||||
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||
ORDER BY name'
|
||||
) %-->
|
||||
<h2><a href="series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
|
||||
<h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
|
||||
<ul>
|
||||
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
|
||||
<li>Open/closed: <!--% display_choice(series.private, 'closed', 'open') %--></li>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<h1>Sitemap</h1>
|
||||
<ul>
|
||||
<li><a href="https://www.hackerpublicradio/calendar.html"><strong>⇧Upload⇧</strong></a> ← Upload Your Show</li>
|
||||
<li><a href="https://www.hackerpublicradio/calendar.php"><strong>⇧Upload⇧</strong></a> ← Upload Your Show</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->index.html"><strong>Home</strong></a> ← The HPR Homepage</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->syndication.html">Get Shows</a> ← The RSS Syndication Feeds</li>
|
||||
<ul>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">Full Episode Guide</a> ← Complete list of all the Shows.</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->series.html">In-Depth Series</a> ← Overview of the In-Depth Series.</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->series/index.html">In-Depth Series</a> ← Overview of the In-Depth Series.</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->download.html">Download Options</a> ← How to download the entire archive.</li>
|
||||
</ul>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->contribute.html">Give Shows</a> ← Upload your podcast show here.</li>
|
||||
|
@@ -6,9 +6,9 @@
|
||||
Use this feed to get the archived episodes. The feed themselves run over 15Mb in size and so use them to download the archived episodes and when you are up to date switch back to the Two Week Feeds listed above.
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="hpr_total_ogg_rss.php">ogg feed</a> Warning over 50G</li>
|
||||
<li><a href="hpr_total_spx_rss.php">spx feed</a> Warning over 22G</li>
|
||||
<li><a href="hpr_total_rss.php">mp3 feed</a> Warning over 36G</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_ogg.rss">ogg feed</a> Warning over 50G</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_spx.rss">spx feed</a> Warning over 22G</li>
|
||||
<li><a href="<!--% absolute_path(baseurl) %-->hpr_total_mp3.rss">mp3 feed</a> Warning over 36G</li>
|
||||
</ul>
|
||||
</article>
|
||||
<article>
|
||||
|
@@ -20,9 +20,9 @@
|
||||
}
|
||||
</style>
|
||||
<link rel="shortcut icon" href="hpr.ico" >
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Ogg Vorbis RSS" href="/hpr_ogg_rss.php" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Speex RSS" href="/hpr_spx_rss.php" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio MP3 RSS" href="/hpr_mp3_rss.php" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Ogg Vorbis RSS" href="<!--% absolute_path(baseurl) %-->hpr_ogg.rss" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Speex RSS" href="<!--% absolute_path(baseurl) %-->hpr_spx.rss" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio MP3 RSS" href="<!--% absolute_path(baseurl) %-->hpr_mp3.rss" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Comments RSS" href="/comments_rss.php" />
|
||||
<link rel="license" title="cc by 3.0" href="https://creativecommons.org/licenses/by-sa/3.0/" />
|
||||
<link href="<!--% absolute_path(baseurl) %-->css/hpr.css" rel="stylesheet" />
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
|
||||
<!--% FOREACH episode IN feed_result %-->
|
||||
<!--% display_item(episode, 'mp3') %-->
|
||||
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
||||
<!--% END %-->
|
@@ -1,5 +0,0 @@
|
||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
|
||||
<!--% FOREACH episode IN feed_result %-->
|
||||
<!--% display_item(episode, 'ogg') %-->
|
||||
<!--% END %-->
|
@@ -1,5 +0,0 @@
|
||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
|
||||
<!--% FOREACH episode IN feed_result %-->
|
||||
<!--% display_item(episode, 'spx') %-->
|
||||
<!--% END %-->
|
5
templates/rss-hpr_total.tpl.xml
Normal file
5
templates/rss-hpr_total.tpl.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||
<!--% PROCESS 'rss-query-hpr_total.tpl.xml' %-->
|
||||
<!--% FOREACH episode IN feed_result %-->
|
||||
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
||||
<!--% END %-->
|
22
templates/rss-query-hpr_total.tpl.xml
Normal file
22
templates/rss-query-hpr_total.tpl.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% query_hpr_feed = DBI.prepare('
|
||||
SELECT
|
||||
eps.id,
|
||||
eps.explicit,
|
||||
strftime(\'%H:%M:%S %d:%m:%Y\', date(eps.date)) AS date,
|
||||
eps.license, eps.duration,
|
||||
eps.title, eps.summary, eps.tags,
|
||||
eps.notes,
|
||||
hosts.local_image,
|
||||
hosts.hostid,
|
||||
hosts.host, hosts.email,
|
||||
miniseries.name AS series, miniseries.id AS seriesid
|
||||
FROM eps
|
||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||
ORDER BY eps.date DESC
|
||||
')
|
||||
%-->
|
||||
<!--% feed_result = query_hpr_feed.execute() %-->
|
||||
|
@@ -1,3 +1,4 @@
|
||||
<!--% USE date %-->
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0"
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||
<!--% MACRO display_item(episode, media_type) BLOCK %-->
|
||||
<!--% MACRO display_item(episode, file_extension, audio_mime_type) BLOCK %-->
|
||||
<!--% IF audio_mime_type == "" %-->
|
||||
<!--% audio_mime_type = 'ogg' %-->
|
||||
<!--% END %-->
|
||||
<item>
|
||||
<itunes:explicit><!--% display_explicit_feed(episode.explicit) %--></itunes:explicit>
|
||||
<googleplay:explicit><!--% display_explicit_feed(episode.explicit) %--></googleplay:explicit>
|
||||
@@ -14,7 +17,7 @@
|
||||
<itunes:summary><![CDATA[<!--% episode.notes %-->]]>
|
||||
</itunes:summary>
|
||||
<pubDate><!--% format_feed_date(episode.date) %--></pubDate>
|
||||
<enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% media_type %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% media_type %-->"/>
|
||||
<guid>http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% media_type %--></guid>
|
||||
<enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% audio_mime_type %-->"/>
|
||||
<guid>http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %--></guid>
|
||||
</item>
|
||||
<!--% END %-->
|
||||
|
Reference in New Issue
Block a user