forked from rho_n/hpr_generator
Compare commits
15 Commits
main
...
I164_check
Author | SHA1 | Date | |
---|---|---|---|
0f57b99fbe
|
|||
48b3c51bb3
|
|||
4e9f1457d5
|
|||
4ae854f5e1
|
|||
af810c88bc
|
|||
|
92dce90753 | ||
|
65e4e1af5e | ||
|
b5384408db | ||
|
1a84becd8d | ||
|
d74c23bace | ||
|
f1817e6820 | ||
|
493bae282b | ||
|
dbc557d4c5 | ||
|
2099f0e130 | ||
|
29c9c827a4 |
@@ -41,8 +41,9 @@ apt install libconfig-std-perl \
|
||||
## Using CPAN to install the modules
|
||||
|
||||
A cross platform method to install the needed modules is the Perl CPAN application.
|
||||
Make sure both the [make](https://www.gnu.org/software/make/manual/make.html)
|
||||
command and the [cpan](https://perldoc.perl.org/CPAN) command are available.
|
||||
Make sure that the [gcc](https://www.gnu.org/software/gcc/),
|
||||
[make](https://www.gnu.org/software/make/manual/make.html),
|
||||
and [cpan](https://perldoc.perl.org/CPAN) commands are available.
|
||||
Install them using the operating system's package manager, or from source.
|
||||
|
||||
Run commands:
|
||||
@@ -51,9 +52,21 @@ Run commands:
|
||||
cpan Config::Std
|
||||
cpan Template
|
||||
cpan Template::Plugin::DBI
|
||||
cpan Template::Plugin::HTML::Strip
|
||||
cpan DBD::SQLite
|
||||
cpan Date::Calc
|
||||
cpan Tie::DBI
|
||||
cpan Text:CSV_XS
|
||||
```
|
||||
|
||||
## Testing for Perl module dependencies
|
||||
|
||||
A bash script is included in the utils directory that will list the Perl modules used by the site-generator and report whether the modules are installed on the current OS.
|
||||
|
||||
It can be run from any directory. To run from the utils directory:
|
||||
|
||||
```
|
||||
./check-dependencies.sh
|
||||
```
|
||||
|
||||
# Create the HPR database
|
||||
|
@@ -25,7 +25,7 @@ Static web page generator for the Hacker Public Radio website.
|
||||
- ``GRANT SELECT ON hpr_hpr.* TO 'hpr-generator'@'localhost';``
|
||||
- ``GRANT EXECUTE ON `hpr_hpr`.* TO 'hpr-generator'@'localhost';``
|
||||
* Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.)
|
||||
* GetOpt
|
||||
* Getopt::Long
|
||||
* Pod::Usage
|
||||
* Config::Std
|
||||
* Template
|
||||
@@ -35,7 +35,7 @@ Static web page generator for the Hacker Public Radio website.
|
||||
* Template::Plugin::HTML::Strip
|
||||
* DBI
|
||||
* Tie::DBI
|
||||
* DBD::SQLite or DBD:mysql
|
||||
* DBD::SQLite or DBD::mysql
|
||||
* Date::Calc
|
||||
* Text::CSV_XS
|
||||
* HTML::Entities
|
||||
@@ -72,6 +72,8 @@ and add the label "**Feature Request**".
|
||||
|
||||
## Authors and acknowledgment
|
||||
* Roan "Rho`n" Horning
|
||||
* Dave Morriss
|
||||
* gordons
|
||||
* Ken Fallon
|
||||
* norrist
|
||||
|
||||
|
BIN
public_html/images/hosts/149.png
Normal file
BIN
public_html/images/hosts/149.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
public_html/images/hosts/421.png
Normal file
BIN
public_html/images/hosts/421.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
public_html/images/hosts/425.png
Normal file
BIN
public_html/images/hosts/425.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
public_html/images/hosts/433.png
Normal file
BIN
public_html/images/hosts/433.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
@@ -122,7 +122,6 @@ use Text::CSV_XS;
|
||||
use HTML::Entities qw(encode_entities);
|
||||
use Date::Calc;
|
||||
use DBI;
|
||||
use DBD::SQLite;
|
||||
use Tie::DBI;
|
||||
use Template;
|
||||
use Template::Plugin::Date;
|
||||
|
@@ -582,9 +582,10 @@
|
||||
|
||||
<h1 id="reserve_queue">Feed the reserve queue<a href="<!--% absolute_url(baseurl,'about.html#reserve_queue') %-->">.</a></h1>
|
||||
<p>
|
||||
The reserve queue is intended only to be used in the cases where there is still a gap in the schedule 24 hours prior to release.
|
||||
The reserve queue is intended only to be used in the cases where there is still a gap in the schedule one week prior to release.
|
||||
This was known as the emergency queue, but now can also be used when the hosts don't care when the shows are scheduled.
|
||||
They will be used on a first come first go basis, when there is no conflict with the scheduling guidelines.
|
||||
These shows contain a message alerting listeners to the fact that we had free slots that were not filled.
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
@@ -592,11 +593,12 @@
|
||||
<h1 id="scheduling_guidelines">Scheduling Guidelines</h1>
|
||||
<ol>
|
||||
<li>You must have your audio recording ready to upload <strong>before</strong> you pick a slot.</li>
|
||||
<li>New hosts, Interviews, and other time critical shows should use the first free slot.</li>
|
||||
<li>Always try and fill any free slots that are available in the upcoming two weeks.</li>
|
||||
<li>If the queue is filling up then please consider leaving some slots free for new contributors.</li>
|
||||
<li>If you have a non urgent show then find a empty week and schedule it then.</li>
|
||||
<li>If you are uploading a series of shows, consider scheduling one every two weeks.</li>
|
||||
<li>Interviews may be released sooner.</li>
|
||||
<li>When the queue is filling up then leave some slots free for new contributors.</li>
|
||||
<li>Post non urgent shows into the first empty week.</li>
|
||||
<li>If you are uploading a series of shows then post them one every two weeks.</li>
|
||||
<li>If you have a non urgent show that is timeless, then add it to the <a href="<!--% absolute_url(baseurl,'about.html#reserve_queue') %-->">Reserve Queue</a>.</li>
|
||||
</ol>
|
||||
|
||||
<hr />
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html#comment_<!--% item.comment_id %-->"><!--% item.comment_author_name %--> says</a>: <!--% item.comment_title %--></h1>
|
||||
<h1><!--% item.comment_author_name %--> says: <!--% item.comment_title %--></h1>
|
||||
<p><small>Posted at <!--% item.comment_timestamp %--> relating to the show <a href="<!--% absolute_path(baseurl) %-->eps/hpr<!--% zero_pad_left(item.eps_id) %-->/index.html">hpr<!--% item.eps_id %--></a> which was released on <!--% item.episode_date %--> by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(item.host_id) %-->.html"><!--% item.host %--></a> entitled <em><!--% item.episode_title %--></em></small>
|
||||
</p>
|
||||
</header>
|
||||
|
@@ -110,9 +110,18 @@ Subscribe to the comments <a href="<!--% absolute_path(baseurl) %-->comments.rss
|
||||
</tr>
|
||||
<!-- . -->
|
||||
<tr>
|
||||
<td>What is the <strong>HOST_ID</strong> for the host of this show?</td>
|
||||
<td>Who is the <strong>host</strong> of this show?</td>
|
||||
<td>
|
||||
<input required type="text" name="hostid" size="20" maxlength="5" placeholder="Type the host number"></td>
|
||||
<select required name="hostid" id="hostid">
|
||||
<option value="Spammer" selected="selected">Spammer</option>
|
||||
<option value="Spammer">Linus Torvalds</option>
|
||||
<option value="Spammer">Marie Curie</option>
|
||||
<option value="<!--% episode.hostid %-->"><!--% episode.host %--></option>
|
||||
<option value="Spammer">Alan Turing</option>
|
||||
<option value="Spammer">Terry Pratchett</option>
|
||||
<option value="Spammer">Yuri Gagarin</option>
|
||||
</select>
|
||||
<td>
|
||||
<td>
|
||||
<!-- . -->
|
||||
<tr>
|
||||
|
73
utils/check-dependencies.sh
Executable file
73
utils/check-dependencies.sh
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/bin/bash -
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: check-dependencies.sh
|
||||
#
|
||||
# USAGE: ./check-dependencies.sh
|
||||
#
|
||||
# DESCRIPTION: Check that Perl module dependencies for the hpr_generator
|
||||
# are installed.
|
||||
#
|
||||
# OPTIONS: ---
|
||||
# REQUIREMENTS: ---
|
||||
# BUGS: ---
|
||||
# NOTES: ---
|
||||
# AUTHOR: Roan "Rho`n" Horning (roan.horning@gmail.com)
|
||||
# ORGANIZATION:
|
||||
# CREATED: 09/05/2024 09:55:00 PM
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: is_module_installed
|
||||
# DESCRIPTION: Tests if the supplied module is found on the system
|
||||
# PARAMETERS: Name of the denpendent Perl module
|
||||
# RETURNS: 0 if not found, 1 if found
|
||||
#-------------------------------------------------------------------------------
|
||||
function is_module_installed {
|
||||
HR="----------------------"
|
||||
perl -e "use ${1} "
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo ${HR}
|
||||
else
|
||||
echo "Found module ${1}"
|
||||
echo ${HR}
|
||||
fi
|
||||
}
|
||||
|
||||
MODULES=( \
|
||||
"Getopt::Long" \
|
||||
"Pod::Usage" \
|
||||
"Config::Std" \
|
||||
"Template" \
|
||||
"Template::Plugin::File" \
|
||||
"Template::Plugin::DBI" \
|
||||
"Template::Plugin::HTML::Strip" \
|
||||
"DBI" \
|
||||
"Tie::DBI" \
|
||||
"DBD::SQLite" \
|
||||
"DBD::mysql" \
|
||||
"Date::Calc" \
|
||||
"Text::CSV_XS" \
|
||||
)
|
||||
|
||||
echo "The following modules must be installed for the site-generator to function: "
|
||||
for module in "${MODULES[@]}"
|
||||
do
|
||||
echo "* ${module}"
|
||||
done
|
||||
echo "When MySQL is used, the DBD:mysql module is required (otherwise it is optional)"
|
||||
echo "When SQLite is used, then the DBD:SQLite module is required (otherwise it is optional)"
|
||||
|
||||
echo "Scanning for modules ..."
|
||||
echo "----------------------"
|
||||
|
||||
for module in "${MODULES[@]}"
|
||||
do
|
||||
is_module_installed "${module}"
|
||||
done
|
||||
|
||||
echo "Finished scanning."
|
Reference in New Issue
Block a user