Update instructions for creating SQLite db

Update the main README file and the POD Installation section
of the site-configuration program.
This commit is contained in:
Roan Horning 2023-03-03 23:53:21 -05:00
parent add92ef20d
commit 24a12a5af3
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
2 changed files with 18 additions and 10 deletions

View File

@ -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

View File

@ -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.