diff --git a/site-generator b/site-generator index f5d67ab..561c344 100755 --- a/site-generator +++ b/site-generator @@ -169,7 +169,10 @@ sub main { exit 1; } - my $tt = get_template_html($config{DBI}, $config{app_paths}); + my $database = 'sqlite'; + my $DB_driver = 'dbi:SQLite:hpr.db'; + + my $tt = get_template_html($database, $DB_driver, $config{app_paths}); # # Define a TTĀ² vmethod called 'csv_parse', it takes a scalar value and @@ -186,7 +189,6 @@ sub main { # Remove non page sections of the configuration file # from the generated list of pages. - @page_args= grep { $_ ne 'DBI' } @page_args; @page_args= grep { $_ ne 'root_template' } @page_args; @page_args= grep { $_ ne 'app_paths' } @page_args; @@ -241,18 +243,16 @@ sub get_template_html { # HTML comments to make the template file valid HTML. # return Template->new( - { INCLUDE_PATH => $_[1]{templates_path}, - OUTPUT_PATH => $_[1]{output_path}, + { INCLUDE_PATH => $_[2]{templates_path}, + OUTPUT_PATH => $_[2]{output_path}, EVAL_PERL => 1, START_TAG => '', PRE_CHOMP => 1, POST_CHOMP => 1, CONSTANTS => { - database => $_[0]{database}, - driver => $_[0]{driver}, - user => $_[0]{user}, - password => $_[0]{password}, + database => $_[0], + driver => $_[1], } } ) || die $Template::ERROR, "\n"; diff --git a/site.cfg b/site.cfg index e41c0b5..4ff0b3b 100644 --- a/site.cfg +++ b/site.cfg @@ -3,17 +3,6 @@ # dbi:: # For more information on Perl Template Toolkit see: # http://template-toolkit.org/docs/manual/index.html -[DBI] -# Configuration settings for SQLite -database: sqlite -driver: dbi:SQLite:hpr.db -#user: (not used - leave blank) -#password: (not used - leave blank) -# Configuration settings for MySQL -#database: mysql -#driver: dbi:mysql:database=hpr_hpr:hostname=localhost -#user: hpr-generator (Suggested user with read-only privileges) -#password: ********* (Password for user) # Configure the location of the templates and the generated HTML [app_paths] diff --git a/templates/content-comments_viewer.tpl.html b/templates/content-comments_viewer.tpl.html index 509b617..2174090 100644 --- a/templates/content-comments_viewer.tpl.html +++ b/templates/content-comments_viewer.tpl.html @@ -2,7 +2,8 @@ - + +

Comment Viewer

Because of the spammers we have had to turn on comment moderation. Sorry about the delay this will cause.

Subscribe to the comment feed.

diff --git a/templates/content-correspondent.tpl.html b/templates/content-correspondent.tpl.html index 537fab4..447e17e 100644 --- a/templates/content-correspondent.tpl.html +++ b/templates/content-correspondent.tpl.html @@ -2,7 +2,7 @@ - + diff --git a/templates/content-correspondents.tpl.html b/templates/content-correspondents.tpl.html index fd68237..f4923be 100644 --- a/templates/content-correspondents.tpl.html +++ b/templates/content-correspondents.tpl.html @@ -3,7 +3,7 @@

Correspondents

For more information on how to become a Correspondent see our contribute page. To add a logo here, either email one to admin at hpr or setup your email on Gravatar. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.

- + diff --git a/templates/content-episode.tpl.html b/templates/content-episode.tpl.html index 9b0c679..c0675a2 100644 --- a/templates/content-episode.tpl.html +++ b/templates/content-episode.tpl.html @@ -4,7 +4,7 @@ - + diff --git a/templates/content-episodes.tpl.html b/templates/content-episodes.tpl.html index 322e0a2..a78f34b 100644 --- a/templates/content-episodes.tpl.html +++ b/templates/content-episodes.tpl.html @@ -7,7 +7,7 @@ All this information is available to the public. Scrape if you wish but if we can format the data for you then we're happy to help.

- + diff --git a/templates/content-index.tpl.html b/templates/content-index.tpl.html index a631465..9d9f33c 100644 --- a/templates/content-index.tpl.html +++ b/templates/content-index.tpl.html @@ -29,7 +29,7 @@

Welcome to HPR, the Community Podcast

- + diff --git a/templates/content-series.tpl.html b/templates/content-series.tpl.html index 0718391..fb995b7 100644 --- a/templates/content-series.tpl.html +++ b/templates/content-series.tpl.html @@ -1,7 +1,7 @@
- +

In-Depth Series

diff --git a/templates/content-series_episode.tpl.html b/templates/content-series_episode.tpl.html index f1e2ecd..63b80f8 100644 --- a/templates/content-series_episode.tpl.html +++ b/templates/content-series_episode.tpl.html @@ -1,7 +1,7 @@ - + diff --git a/templates/content-tags.tpl.html b/templates/content-tags.tpl.html index d56b9b5..ffed277 100644 --- a/templates/content-tags.tpl.html +++ b/templates/content-tags.tpl.html @@ -1,6 +1,6 @@ - + $Template::Stash::PRIVATE = undef; # Allow . in tag diff --git a/templates/content-twat_episode.tpl.html b/templates/content-twat_episode.tpl.html index 52b0340..a560740 100644 --- a/templates/content-twat_episode.tpl.html +++ b/templates/content-twat_episode.tpl.html @@ -2,7 +2,7 @@ - + + diff --git a/templates/ids-episode.tpl.html b/templates/ids-episode.tpl.html index c4df5ab..a3b89ac 100644 --- a/templates/ids-episode.tpl.html +++ b/templates/ids-episode.tpl.html @@ -1,5 +1,5 @@ - + , diff --git a/templates/ids-twat_episode.tpl.html b/templates/ids-twat_episode.tpl.html index d7eaa0c..9616fe6 100644 --- a/templates/ids-twat_episode.tpl.html +++ b/templates/ids-twat_episode.tpl.html @@ -1,4 +1,4 @@ - + diff --git a/templates/queries-call_for_shows-mysql.tpl.html b/templates/queries-call_for_shows-mysql.tpl.html deleted file mode 100644 index 9f67a7a..0000000 --- a/templates/queries-call_for_shows-mysql.tpl.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/templates/queries-correspondent-mysql.tpl.html b/templates/queries-correspondent-mysql.tpl.html deleted file mode 100644 index 6f3de33..0000000 --- a/templates/queries-correspondent-mysql.tpl.html +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/templates/queries-episode-mysql.tpl.html b/templates/queries-episode-mysql.tpl.html deleted file mode 100644 index c99df5e..0000000 --- a/templates/queries-episode-mysql.tpl.html +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/templates/queries-episodes-mysql.tpl.html b/templates/queries-episodes-mysql.tpl.html deleted file mode 100644 index c381277..0000000 --- a/templates/queries-episodes-mysql.tpl.html +++ /dev/null @@ -1,15 +0,0 @@ - - diff --git a/templates/queries-ids-episode-mysql.tpl.html b/templates/queries-ids-episode-mysql.tpl.html deleted file mode 100644 index 8b0f68c..0000000 --- a/templates/queries-ids-episode-mysql.tpl.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/templates/queries-index-mysql.tpl.html b/templates/queries-index-mysql.tpl.html deleted file mode 100644 index e46b480..0000000 --- a/templates/queries-index-mysql.tpl.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - diff --git a/templates/queries-series-mysql.tpl.html b/templates/queries-series-mysql.tpl.html deleted file mode 100644 index c98f680..0000000 --- a/templates/queries-series-mysql.tpl.html +++ /dev/null @@ -1,15 +0,0 @@ - - diff --git a/templates/queries-series_episodes-mysql.tpl.html b/templates/queries-series_episodes-mysql.tpl.html deleted file mode 100644 index ef907da..0000000 --- a/templates/queries-series_episodes-mysql.tpl.html +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/templates/queries-tags-mysql.tpl.html b/templates/queries-tags-mysql.tpl.html deleted file mode 100644 index 9b5e099..0000000 --- a/templates/queries-tags-mysql.tpl.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/templates/rss-comments.tpl.xml b/templates/rss-comments.tpl.xml index 8b9b42d..6bbd0de 100644 --- a/templates/rss-comments.tpl.xml +++ b/templates/rss-comments.tpl.xml @@ -24,7 +24,7 @@ 144 - + diff --git a/templates/rss-query-hpr-mysql.tpl.xml b/templates/rss-query-hpr-mysql.tpl.xml deleted file mode 100644 index 1b284a7..0000000 --- a/templates/rss-query-hpr-mysql.tpl.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - diff --git a/templates/rss-query-hpr-sqlite.tpl.xml b/templates/rss-query-hpr-sqlite.tpl.xml index 3466471..20d4ac7 100644 --- a/templates/rss-query-hpr-sqlite.tpl.xml +++ b/templates/rss-query-hpr-sqlite.tpl.xml @@ -1,4 +1,4 @@ - + - - - diff --git a/templates/rss-query-hpr_total-sqlite.tpl.xml b/templates/rss-query-hpr_total-sqlite.tpl.xml index fd02ab6..a4397a7 100644 --- a/templates/rss-query-hpr_total-sqlite.tpl.xml +++ b/templates/rss-query-hpr_total-sqlite.tpl.xml @@ -1,4 +1,4 @@ - +
Avatar