From be1344e10c19af69397c9d124b1f516828e83c0a Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Thu, 20 Oct 2022 23:23:00 -0400 Subject: [PATCH 01/18] Update database connection information --- site.cfg | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/site.cfg b/site.cfg index 474766b..faff6f3 100644 --- a/site.cfg +++ b/site.cfg @@ -2,9 +2,9 @@ # with the database. # dbi:: [DBI] -driver: dbi:SQLite:hpr.db -user: -password: +driver: dbi:mysql:database=hpr_hpr:hostname=localhost +user: hpr-generator +password: zBozqN-Z2zNAz # Configure the root template page which pulls in the navigation and # content templates used by each page. An optional baseurl property may @@ -13,6 +13,8 @@ password: [root_template] content: page.tpl.html #baseurl: OPTIONAL [i.e. file://] +baseurl: file:///home/roan/Development/hpr/website/hpr_generator/public_html/ +media_baseurl: https://archive.org/download/hpr$eps_id/ # Configure the navigation menu and the content templates for each page # of the site: @@ -137,6 +139,7 @@ navigation: navigation-get-shows.tpl.html content: content-twat_episode.tpl.html multipage: true filename: eps/twat[id]/index.html +media_baseurl: https://www.hackerpublicradio.org/eps/ [mumble-howto] navigation: navigation-about.tpl.html From aad77f3c781ee127aa51fa60bc2833b3daaf7e49 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Thu, 20 Oct 2022 23:24:56 -0400 Subject: [PATCH 02/18] Convert index page queries from SQLite to MySQL --- templates/content-index.tpl.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/templates/content-index.tpl.html b/templates/content-index.tpl.html index 2066dca..d05a226 100644 --- a/templates/content-index.tpl.html +++ b/templates/content-index.tpl.html @@ -10,19 +10,20 @@ @@ -65,8 +66,8 @@ INNER JOIN hosts ON eps.hostid = hosts.hostid INNER JOIN miniseries ON eps.series = miniseries.id LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id - WHERE eps.date < date(\'now\', \'+1 days\') - ORDER BY eps.id + 0 DESC + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) + ORDER BY eps.id DESC LIMIT 10 ') %--> @@ -106,8 +107,8 @@ 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.id + 0 DESC + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) + ORDER BY eps.id DESC LIMIT 30 OFFSET 10 ') %--> From e1b018927502f54c40ed76dea234c0f71b42456f Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 19:46:31 -0400 Subject: [PATCH 03/18] Convert correspondent page queries from SQLite to MySQL --- templates/content-correspondent.tpl.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/templates/content-correspondent.tpl.html b/templates/content-correspondent.tpl.html index f63b850..3da8127 100644 --- a/templates/content-correspondent.tpl.html +++ b/templates/content-correspondent.tpl.html @@ -5,7 +5,8 @@ @@ -33,8 +35,9 @@ From 4af117fb7a53c86a9edd4463158b8dddc94395e5 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 19:52:53 -0400 Subject: [PATCH 04/18] Convert episodes page queries from SQLite to MySQL --- templates/content-episodes.tpl.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/content-episodes.tpl.html b/templates/content-episodes.tpl.html index a1683db..a746c94 100644 --- a/templates/content-episodes.tpl.html +++ b/templates/content-episodes.tpl.html @@ -19,8 +19,8 @@ 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.id + 0 DESC + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) + ORDER BY eps.id DESC ') %--> @@ -42,7 +42,7 @@ FROM twat_eps as eps INNER JOIN hosts ON eps.hostid = hosts.hostid INNER JOIN miniseries ON eps.series = miniseries.id - ORDER BY eps.id + 0 DESC + ORDER BY eps.id DESC ') %--> From 5612eeed42ea5563d01ae33434486fee13153798 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 20:07:53 -0400 Subject: [PATCH 05/18] Convert episode page queries from SQLite to MySQL --- templates/content-episode.tpl.html | 4 ++-- templates/ids-episode.tpl.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/content-episode.tpl.html b/templates/content-episode.tpl.html index 4920449..c3987c2 100644 --- a/templates/content-episode.tpl.html +++ b/templates/content-episode.tpl.html @@ -7,7 +7,7 @@ WITH episode_maxmin AS ( SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\' FROM eps - WHERE eps.date < date (\'now\', \'+1 days\') + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) ), episode_date AS ( SELECT eps.date @@ -26,7 +26,7 @@ FROM eps INNER JOIN episode_date ON eps.date > episode_date.date - WHERE eps.date < date (\'now\') + WHERE eps.date < NOW() ), comment_tallies AS ( SELECT diff --git a/templates/ids-episode.tpl.html b/templates/ids-episode.tpl.html index 1271a26..bd55bb0 100644 --- a/templates/ids-episode.tpl.html +++ b/templates/ids-episode.tpl.html @@ -1,7 +1,7 @@ , From e3abe5fd68dbb3e2c1206786ab7ae79ca8b52c4a Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 20:11:19 -0400 Subject: [PATCH 06/18] Convert series episode page queries from SQLite to MySQL --- templates/content-series_episode.tpl.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/content-series_episode.tpl.html b/templates/content-series_episode.tpl.html index e74fe50..a05cc84 100644 --- a/templates/content-series_episode.tpl.html +++ b/templates/content-series_episode.tpl.html @@ -38,7 +38,7 @@ INNER JOIN hosts ON eps.hostid = hosts.hostid WHERE series = ? - ORDER BY eps.id + 0 DESC + ORDER BY eps.id DESC ') %--> From 979c8b43e55e46ce2c60d3e1e937607027d8bb5d Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 20:43:22 -0400 Subject: [PATCH 07/18] Convert twat episode page queries from SQLite to MySQL --- templates/content-twat_episode.tpl.html | 4 ++-- templates/ids-twat_episode.tpl.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/content-twat_episode.tpl.html b/templates/content-twat_episode.tpl.html index ef9d965..7840b3c 100644 --- a/templates/content-twat_episode.tpl.html +++ b/templates/content-twat_episode.tpl.html @@ -7,7 +7,7 @@ WITH episode_maxmin AS ( SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\' FROM twat_eps AS eps - WHERE eps.date < date (\'now\', \'+1 days\') + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) ), episode_date AS ( SELECT eps.date @@ -26,7 +26,7 @@ FROM twat_eps AS eps INNER JOIN episode_date ON eps.date > episode_date.date - WHERE eps.date < date (\'now\') + WHERE eps.date < NOW() ) SELECT eps.id, eps.date, eps.title, eps.duration, eps.summary, eps.notes, eps.explicit, eps.license, diff --git a/templates/ids-twat_episode.tpl.html b/templates/ids-twat_episode.tpl.html index 2609648..5291f72 100644 --- a/templates/ids-twat_episode.tpl.html +++ b/templates/ids-twat_episode.tpl.html @@ -1,7 +1,7 @@ , From 6f95a33e67b8f9395bc0570307e94e8249727a41 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 22:53:13 -0400 Subject: [PATCH 08/18] Convert hpr rss queries from SQLite to MySQL --- templates/rss-query-hpr.tpl.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rss-query-hpr.tpl.xml b/templates/rss-query-hpr.tpl.xml index 53e32c2..85443c8 100644 --- a/templates/rss-query-hpr.tpl.xml +++ b/templates/rss-query-hpr.tpl.xml @@ -3,7 +3,7 @@ SELECT eps.id, eps.explicit, - strftime(\'%H:%M:%S %d:%m:%Y\', date(eps.date)) AS date, + DATE_FORMAT(eps.date, \'%H:%i:%S %d:%m:%Y\') AS \'date\', eps.license, eps.duration, eps.title, eps.summary, eps.tags, eps.notes, @@ -14,7 +14,7 @@ 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\') + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) ORDER BY eps.date DESC LIMIT 10 ') From 8c3874ad8bf1efec0c6a157ec697fcd185eddf36 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 21 Oct 2022 23:00:03 -0400 Subject: [PATCH 09/18] Convert hpr total rss queries from SQLite to MySQL --- templates/rss-query-hpr_total.tpl.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rss-query-hpr_total.tpl.xml b/templates/rss-query-hpr_total.tpl.xml index 1465690..4846f16 100644 --- a/templates/rss-query-hpr_total.tpl.xml +++ b/templates/rss-query-hpr_total.tpl.xml @@ -3,7 +3,7 @@ SELECT eps.id, eps.explicit, - strftime(\'%H:%M:%S %d:%m:%Y\', date(eps.date)) AS date, + DATE_FORMAT(eps.date, \'%H:%i:%S %d:%m:%Y\') AS \'date\', eps.license, eps.duration, eps.title, eps.summary, eps.tags, eps.notes, @@ -14,7 +14,7 @@ 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\') + WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) ORDER BY eps.date DESC ') %--> From 0b99483f0d934faf53228fad2169e4884241cb54 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sat, 22 Oct 2022 21:11:57 -0400 Subject: [PATCH 10/18] Update installation instruction to include details for MySQL --- README.md | 25 +++++++++++++++++-------- site-generator | 24 ++++++++++++++++++------ 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1bdf28f..39ab07d 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,22 @@ Static web page generator for the Hacker Public Radio website. ## Installation * Clone or download this repository -* Create the sqlite3 database from the files in the _sql directory. The default name for the database file is "hpr.db" and should be located in the root of the project directory. The name and location can be set in the site.cfg file. -* Two sql helper scripts are available to generate an empty database or a database filled with test data. - - For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db` - - For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db` -* SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries. Must convert WITH - clauses to sub-queries when using earlier versions of SQLite. +* With SQLite + * Create the sqlite3 database from the files in the _sql directory. The default name for the database file is "hpr.db" and should be located in the root of the project directory. The name and location can be set in the site.cfg file. + * Two sql helper scripts are available to generate an empty database or a database filled with test data. + - For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db` + - For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db` + * SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries. Must convert WITH + clauses to sub-queries when using earlier versions of SQLite. +* With MySQL + * Create database hpr_hpr in the MySQL server from HPR dump file. + - ``sudo mysql --host=localhost < hpr.sql`` + * Create a user that will be used by the site-generator. + - Suggested username: hpr-generator + - ``CREATE USER 'hpr-generator'@'localhost' IDENTIFIED BY '';`` + * Limit the user's privileges to EXECUTE and SELECT + - ``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 * Pod::Usage @@ -18,7 +28,7 @@ Static web page generator for the Hacker Public Radio website. * Template::Plugin::DBI * DBI * Tie::DBI - * DBD::SQLite + * DBD::SQLite or DBD:mysql * Date::Calc ## Usage @@ -50,4 +60,3 @@ and add the label "**Feature Request**". ## Authors and acknowledgment * Roan "Rho`n" Horning - diff --git a/site-generator b/site-generator index 86e52a7..3a59d65 100755 --- a/site-generator +++ b/site-generator @@ -35,15 +35,27 @@ This is a site generator for the Hacker Public Radio website based upon the Perl =head1 INSTALLATION + With SQLite * Create the sqlite3 database from the files in the _sql directory. The default name for the database file is "hpr.db" and should be located in the root of the project directory. The name and location can be set in the site.cfg file. * Two sql helper scripts are available to generate an empty database or a database filled with test data. - - For an empty database: `cat Create_Database_Empty.sql | sqlite3 hpr.db` - - For a database with test data: `cat Create_Database_Test.sql | sqlite3 hpr.db` - * SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries. Must convert WITH - clauses to sub-queries when using earlier versions of SQLite. - * Install the needed Perl modules using preferred method (distribution packages, CPAN, etc.) + - For an empty database: cat Create_Database_Empty.sql | sqlite3 hpr.db + - For a database with test data: cat Create_Database_Test.sql | sqlite3 hpr.db + * SQLite v3.8.3 or greater is recommended. CTE WITH clauses are used in some template queries. + Must convert WITH clauses to sub-queries when using earlier versions of SQLite. + + With MySQL + * Create database hpr_hpr in the MySQL server from HPR dump file. + - sudo mysql --host=localhost < hpr.sql + * Create a user that will be used by the site-generator. + - Suggested username: hpr-generator + - CREATE USER 'hpr-generator'@'localhost' IDENTIFIED BY ''; + * Limit the user's privileges to EXECUTE and SELECT + - 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 * Pod::Usage * Config::Std @@ -52,7 +64,7 @@ This is a site generator for the Hacker Public Radio website based upon the Perl * Template::Plugin::DBI * DBI * Tie::DBI - * DBD::SQLite + * DBD::SQLite or DBD:mysql * Date::Calc =head1 AUTHOR From cb881558ca9a066503440f7cd3d205f924700f78 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 27 Nov 2022 13:11:14 -0500 Subject: [PATCH 11/18] Add database type constant for use in templates This is used to select which database specific SQL query to use. --- site-generator | 1 + site.cfg | 1 + 2 files changed, 2 insertions(+) diff --git a/site-generator b/site-generator index 3a59d65..c758a37 100755 --- a/site-generator +++ b/site-generator @@ -198,6 +198,7 @@ sub get_template_html (\%@) { PRE_CHOMP => 1, POST_CHOMP => 1, CONSTANTS => { + database => $_[0]{database}, driver => $_[0]{driver}, user => $_[0]{user}, password => $_[0]{password}, diff --git a/site.cfg b/site.cfg index faff6f3..807f3e5 100644 --- a/site.cfg +++ b/site.cfg @@ -2,6 +2,7 @@ # with the database. # dbi:: [DBI] +database: mysql driver: dbi:mysql:database=hpr_hpr:hostname=localhost user: hpr-generator password: zBozqN-Z2zNAz From 6f28bb2a163e7cfae343bf69468a243522732ed9 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 27 Nov 2022 13:54:14 -0500 Subject: [PATCH 12/18] Refactor MySQL database specific SQL --- templates/content-index.tpl.html | 62 ++------------------------ templates/queries-index-mysql.tpl.html | 62 ++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 58 deletions(-) create mode 100644 templates/queries-index-mysql.tpl.html diff --git a/templates/content-index.tpl.html b/templates/content-index.tpl.html index 664a9e2..c7e6288 100644 --- a/templates/content-index.tpl.html +++ b/templates/content-index.tpl.html @@ -3,6 +3,7 @@ +
@@ -10,21 +11,7 @@
- @@ -47,33 +34,7 @@

Latest Shows

-
@@ -99,22 +60,7 @@

Previous five weeks

- diff --git a/templates/queries-index-mysql.tpl.html b/templates/queries-index-mysql.tpl.html new file mode 100644 index 0000000..120b936 --- /dev/null +++ b/templates/queries-index-mysql.tpl.html @@ -0,0 +1,62 @@ + + + + From 675f8fa9d5d9deac878d80690d7902ed6d59a5ab Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 27 Nov 2022 14:04:12 -0500 Subject: [PATCH 13/18] Refactor MySQL database specific SQL --- templates/content-episodes.tpl.html | 17 ++--------------- templates/queries-episodes-mysql.tpl.html | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 templates/queries-episodes-mysql.tpl.html diff --git a/templates/content-episodes.tpl.html b/templates/content-episodes.tpl.html index a746c94..ca5153d 100644 --- a/templates/content-episodes.tpl.html +++ b/templates/content-episodes.tpl.html @@ -1,4 +1,5 @@ +

Complete Archive of Shows.

@@ -7,21 +8,7 @@

- diff --git a/templates/queries-episodes-mysql.tpl.html b/templates/queries-episodes-mysql.tpl.html new file mode 100644 index 0000000..a0fe9b5 --- /dev/null +++ b/templates/queries-episodes-mysql.tpl.html @@ -0,0 +1,15 @@ + + From 3cc6da57ad2931e7c9c5b3e74094e02e5f43c511 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Mon, 28 Nov 2022 19:49:06 -0500 Subject: [PATCH 14/18] Refactor MySQL database specific SQL --- templates/content-episode.tpl.html | 52 +------------------- templates/ids-episode.tpl.html | 6 +-- templates/queries-episode-mysql.tpl.html | 51 +++++++++++++++++++ templates/queries-ids-episode-mysql.tpl.html | 4 ++ 4 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 templates/queries-episode-mysql.tpl.html create mode 100644 templates/queries-ids-episode-mysql.tpl.html diff --git a/templates/content-episode.tpl.html b/templates/content-episode.tpl.html index c3987c2..0c33086 100644 --- a/templates/content-episode.tpl.html +++ b/templates/content-episode.tpl.html @@ -2,57 +2,9 @@ + - diff --git a/templates/ids-episode.tpl.html b/templates/ids-episode.tpl.html index bd55bb0..c4df5ab 100644 --- a/templates/ids-episode.tpl.html +++ b/templates/ids-episode.tpl.html @@ -1,8 +1,6 @@ + - + , diff --git a/templates/queries-episode-mysql.tpl.html b/templates/queries-episode-mysql.tpl.html new file mode 100644 index 0000000..dee01c1 --- /dev/null +++ b/templates/queries-episode-mysql.tpl.html @@ -0,0 +1,51 @@ + diff --git a/templates/queries-ids-episode-mysql.tpl.html b/templates/queries-ids-episode-mysql.tpl.html new file mode 100644 index 0000000..2f19eb3 --- /dev/null +++ b/templates/queries-ids-episode-mysql.tpl.html @@ -0,0 +1,4 @@ + + From 1312e3d374c4858d18fbba277a47df9b33a53d54 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Mon, 28 Nov 2022 19:52:39 -0500 Subject: [PATCH 15/18] Refactor MySQL database specific SQL --- templates/content-correspondent.tpl.html | 21 +++---------------- .../queries-correspondent-mysql.tpl.html | 18 ++++++++++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 templates/queries-correspondent-mysql.tpl.html diff --git a/templates/content-correspondent.tpl.html b/templates/content-correspondent.tpl.html index 3da8127..2b677a2 100644 --- a/templates/content-correspondent.tpl.html +++ b/templates/content-correspondent.tpl.html @@ -1,6 +1,7 @@ + - - + diff --git a/templates/queries-correspondent-mysql.tpl.html b/templates/queries-correspondent-mysql.tpl.html new file mode 100644 index 0000000..2876cff --- /dev/null +++ b/templates/queries-correspondent-mysql.tpl.html @@ -0,0 +1,18 @@ + From 2b4802508d12675fb7962537125dd7a5eae09caa Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Mon, 28 Nov 2022 19:55:51 -0500 Subject: [PATCH 16/18] Remove superflous WHERE condition --- templates/content-twat_episode.tpl.html | 2 -- templates/ids-twat_episode.tpl.html | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/content-twat_episode.tpl.html b/templates/content-twat_episode.tpl.html index 7840b3c..a408bea 100644 --- a/templates/content-twat_episode.tpl.html +++ b/templates/content-twat_episode.tpl.html @@ -7,7 +7,6 @@ WITH episode_maxmin AS ( SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\' FROM twat_eps AS eps - WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) ), episode_date AS ( SELECT eps.date @@ -26,7 +25,6 @@ FROM twat_eps AS eps INNER JOIN episode_date ON eps.date > episode_date.date - WHERE eps.date < NOW() ) SELECT eps.id, eps.date, eps.title, eps.duration, eps.summary, eps.notes, eps.explicit, eps.license, diff --git a/templates/ids-twat_episode.tpl.html b/templates/ids-twat_episode.tpl.html index 5291f72..d7eaa0c 100644 --- a/templates/ids-twat_episode.tpl.html +++ b/templates/ids-twat_episode.tpl.html @@ -1,7 +1,6 @@ , From cb65d25cfc8e944df5533d8efce328096231ffb3 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Mon, 28 Nov 2022 22:47:53 -0500 Subject: [PATCH 17/18] Refactor MySQL database specific SQL --- templates/queries-call_for_shows-mysql.tpl.html | 6 ++++++ templates/queries-call_for_shows-sqlite.tpl.html | 6 ++++++ templates/shared-call_for_shows.tpl.html | 9 +++------ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 templates/queries-call_for_shows-mysql.tpl.html create mode 100644 templates/queries-call_for_shows-sqlite.tpl.html diff --git a/templates/queries-call_for_shows-mysql.tpl.html b/templates/queries-call_for_shows-mysql.tpl.html new file mode 100644 index 0000000..4f17762 --- /dev/null +++ b/templates/queries-call_for_shows-mysql.tpl.html @@ -0,0 +1,6 @@ + diff --git a/templates/queries-call_for_shows-sqlite.tpl.html b/templates/queries-call_for_shows-sqlite.tpl.html new file mode 100644 index 0000000..bf6021d --- /dev/null +++ b/templates/queries-call_for_shows-sqlite.tpl.html @@ -0,0 +1,6 @@ + diff --git a/templates/shared-call_for_shows.tpl.html b/templates/shared-call_for_shows.tpl.html index ece6c06..d09e8fc 100644 --- a/templates/shared-call_for_shows.tpl.html +++ b/templates/shared-call_for_shows.tpl.html @@ -1,12 +1,9 @@ + - - +
From 2a486cb58b04a7175e83a584c51d840648e0f71b Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Wed, 8 Feb 2023 16:05:36 -0500 Subject: [PATCH 18/18] Add SQLite specific query templates --- .../queries-correspondent-sqlite.tpl.html | 18 ++++++ templates/queries-episode-sqlite.tpl.html | 51 +++++++++++++++ templates/queries-episodes-sqlite.tpl.html | 15 +++++ templates/queries-ids-episode-sqlite.tpl.html | 4 ++ templates/queries-index-sqlite.tpl.html | 62 +++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 templates/queries-correspondent-sqlite.tpl.html create mode 100644 templates/queries-episode-sqlite.tpl.html create mode 100644 templates/queries-episodes-sqlite.tpl.html create mode 100644 templates/queries-ids-episode-sqlite.tpl.html create mode 100644 templates/queries-index-sqlite.tpl.html diff --git a/templates/queries-correspondent-sqlite.tpl.html b/templates/queries-correspondent-sqlite.tpl.html new file mode 100644 index 0000000..dbd8469 --- /dev/null +++ b/templates/queries-correspondent-sqlite.tpl.html @@ -0,0 +1,18 @@ + diff --git a/templates/queries-episode-sqlite.tpl.html b/templates/queries-episode-sqlite.tpl.html new file mode 100644 index 0000000..b2566bd --- /dev/null +++ b/templates/queries-episode-sqlite.tpl.html @@ -0,0 +1,51 @@ + diff --git a/templates/queries-episodes-sqlite.tpl.html b/templates/queries-episodes-sqlite.tpl.html new file mode 100644 index 0000000..9a203b2 --- /dev/null +++ b/templates/queries-episodes-sqlite.tpl.html @@ -0,0 +1,15 @@ + + diff --git a/templates/queries-ids-episode-sqlite.tpl.html b/templates/queries-ids-episode-sqlite.tpl.html new file mode 100644 index 0000000..71e012a --- /dev/null +++ b/templates/queries-ids-episode-sqlite.tpl.html @@ -0,0 +1,4 @@ + + diff --git a/templates/queries-index-sqlite.tpl.html b/templates/queries-index-sqlite.tpl.html new file mode 100644 index 0000000..1029b05 --- /dev/null +++ b/templates/queries-index-sqlite.tpl.html @@ -0,0 +1,62 @@ + + + +