Compare commits
	
		
			8 Commits
		
	
	
		
			0dc5a78dae
			...
			I30-Series
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					082ea4069d | ||
| 
						
						
							
						
						dfbb4a24db
	
				 | 
					
					
						|||
| 
						
						
							
						
						4e1d525e6e
	
				 | 
					
					
						|||
| 
						
						
							
						
						694c100bcf
	
				 | 
					
					
						|||
| 
						
						
							
						
						52a314f2a9
	
				 | 
					
					
						|||
| 
						
						
							
						
						b36293e52f
	
				 | 
					
					
						|||
| 
						
						
							
						
						02eb8313d3
	
				 | 
					
					
						|||
| 
						
						
							
						
						ff2ced6774
	
				 | 
					
					
						
@@ -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`
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -266,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/;
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user