Issue #259 - Remove MySQL specific code from site generation code #261

Merged
rho_n merged 1 commits from paulj/hpr_generator:remove_mysql_code into main 2025-04-07 16:47:15 +00:00
Contributor

The following changes have been made:

  • Updated site-generator
  • Removed [DBI] configuration section
  • Updated template files to remove un-used field
  • Deleted MySQL specific template files.

It is building and functioning locally - I suggest a check on the server would be prudent before merging!

The following changes have been made: - Updated site-generator - Removed [DBI] configuration section - Updated template files to remove un-used field - Deleted MySQL specific template files. It is building and functioning locally - I suggest a check on the server would be prudent before merging!
paulj added 1 commit 2025-04-03 06:39:35 +00:00
- Updated site-generator
 - Removed [DBI] configuration section
 - Updated template files to remove un-used field
 - Deleted MySQL specific template files.
rho_n requested changes 2025-04-03 14:00:58 +00:00
Dismissed
rho_n left a comment
Owner

Hi Paul,

I am ok with removing the mysql specific templates, but I would like to keep the site-generator itself DB agnostic. So a reversion to those changes in the site-generator Perl code is requested.

In general, I view the site-generator.pl code as independent of HPR (so want to keep that code as generic as possible), while the templates are HPR specific.

Hi Paul, I am ok with removing the mysql specific templates, but I would like to keep the site-generator itself DB agnostic. So a reversion to those changes in the site-generator Perl code is requested. In general, I view the site-generator.pl code as independent of HPR (so want to keep that code as generic as possible), while the templates are HPR specific.
rho_n reviewed 2025-04-03 14:02:21 +00:00
site.cfg Outdated
@ -3,17 +3,6 @@
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
# For more information on Perl Template Toolkit see:
# http://template-toolkit.org/docs/manual/index.html
[DBI]
Owner

Per previous request, the DBI section needs to be retained but we can remove any comments about setting up a connection to a mysql db

Per previous request, the DBI section needs to be retained but we can remove any comments about setting up a connection to a mysql db
paulj marked this conversation as resolved
rho_n reviewed 2025-04-03 16:56:12 +00:00
@ -2,7 +2,8 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% PROCESS "queries-episode-${constants.database}.tpl.html" %-->
Owner

For all of the PROCESS statements that pull in the "queries-*.tpl.html" templates in the various page templates. These could be changed to just pull in the "queries-*-sqlite.tpl.html" directly. Those *.sqlite.tpl.html query templates could also drop the sqlite in the naming scheme.

For example: queries-episode-sqlite.tpl.html is renamed queries-episode.tpl.html and then the PROCESS statement can change to:
<!--% PROCESS 'queries-episode.tpl.html' %-->

For all of the PROCESS statements that pull in the "queries-\*.tpl.html" templates in the various page templates. These could be changed to just pull in the "queries-\*-sqlite.tpl.html" directly. Those *.sqlite.tpl.html query templates could also drop the sqlite in the naming scheme. For example: _queries-episode-sqlite.tpl.html_ is renamed _queries-episode.tpl.html_ and then the PROCESS statement can change to: `<!--% PROCESS 'queries-episode.tpl.html' %-->`
paulj marked this conversation as resolved
paulj force-pushed remove_mysql_code from c5c5dd89b9 to 86e1d73085 2025-04-04 09:31:37 +00:00 Compare
Author
Contributor

@rho_n - Hopefully I have captured all your points! Thanks for reviewing.

@rho_n - Hopefully I have captured all your points! Thanks for reviewing.
rho_n approved these changes 2025-04-07 16:46:30 +00:00
rho_n left a comment
Owner

Looks great Paul! Thanks for this PR and your continued interest in helping with the code.

Looks great Paul! Thanks for this PR and your continued interest in helping with the code.
rho_n merged commit 013beca3c0 into main 2025-04-07 16:47:15 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HPR/hpr_generator#261
No description provided.