From 24a12a5af3e60f1d91f31eef71a36c447240a4c1 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Fri, 3 Mar 2023 23:53:21 -0500 Subject: [PATCH] Update instructions for creating SQLite db Update the main README file and the POD Installation section of the site-configuration program. --- README.md | 13 +++++++++---- site-generator | 15 +++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 39ab07d..fff337a 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,15 @@ Static web page generator for the Hacker Public Radio website. ## Installation * Clone or download this repository * 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` + * Create the sqlite3 database from the hpr.sql MySQL dump file available on + hackerpublicradio.org. 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. + * An "update-hpr.sh" helper script is available in the utils directory. This + script will download the hpr.sql file, convert it to the SQLite hpr.db file, + and regenerate the website using the site-generator. + 1. `cd` into the root of the project directory + 2. Run `./utils/update-hpr.sh` * 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 diff --git a/site-generator b/site-generator index c758a37..61b515b 100755 --- a/site-generator +++ b/site-generator @@ -36,12 +36,15 @@ 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 + * Create the sqlite3 database from the hpr.sql MySQL dump file available on + hackerpublicradio.org. 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. + * An "update-hpr.sh" helper script is available in the utils directory. This + script will download the hpr.sql file, convert it to the SQLite hpr.db file, + and regenerate the website using the site-generator. + 1. `cd` into the root of the project directory + 2. Run `./utils/update-hpr.sh` * 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.