Updates to three scripts
Database/edit_episode: updated a message Database/query2csv, Database/query2tt2: updated both scripts to handle SQLite and MySQL databases; both take (almost) the same options; both query a database in a similar way with arguments to match placeholders; 'query2tt2' takes a TT² template and options to feed to it; converted the database connection section to a function 'db_connect'; both have comprehensive POD documentation.
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
# BUGS: ---
|
||||
# NOTES: Had to revert to MySQL due to a problem with DBD::MariaDB
|
||||
# AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com
|
||||
# VERSION: 0.1.3
|
||||
# VERSION: 0.1.4
|
||||
# CREATED: 2015-06-17 23:17:50
|
||||
# REVISION: 2022-02-16 20:07:45
|
||||
# REVISION: 2024-07-20 11:21:19
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -39,7 +39,7 @@ use Data::Dumper;
|
||||
#
|
||||
# Version number (manually incremented)
|
||||
#
|
||||
our $VERSION = '0.1.3';
|
||||
our $VERSION = '0.1.4';
|
||||
|
||||
#
|
||||
# Script and directory names
|
||||
@@ -301,11 +301,11 @@ sub change_episode {
|
||||
#
|
||||
if ($rv) {
|
||||
my $ccount = scalar( keys(%changes) );
|
||||
printf "Updated database (%d %s to the eps row)\n",
|
||||
$ccount, _plural( 'change', $ccount );
|
||||
printf "Updated database (%d %s to the eps row for show %s)\n",
|
||||
$ccount, _plural( 'change', $ccount ), $show;
|
||||
}
|
||||
else {
|
||||
print "Episode not updated due to error\n";
|
||||
print "Episode $show not updated due to error\n";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -603,7 +603,7 @@ edit_episode - edit one or more fields in the database for a given HPR show
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
This documentation refers to edit_episode version 0.1.3
|
||||
This documentation refers to edit_episode version 0.1.4
|
||||
|
||||
|
||||
=head1 USAGE
|
||||
|
Reference in New Issue
Block a user