[MKDoc-commit] Modifed data-loading code to work with new UFI::CentresCSV module and

sam at mkdoc.demon.co.uk sam at mkdoc.demon.co.uk
Mon Aug 14 00:58:54 BST 2006


Log Message:
-----------
Modifed data-loading code to work with new UFI::CentresCSV module and prepare normalised fields for UFI::Centres.

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/tools:
        ufi_load_centre_details.pl

-------------- next part --------------
Index: ufi_load_centre_details.pl
===================================================================
RCS file: /var/spool/cvs/mkd/tools/Attic/ufi_load_centre_details.pl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltools/ufi_load_centre_details.pl -Ltools/ufi_load_centre_details.pl -u -r1.1.2.1 -r1.1.2.2
--- tools/ufi_load_centre_details.pl
+++ tools/ufi_load_centre_details.pl
@@ -35,7 +35,7 @@
 use strict;
 use warnings;
 use MKDoc;
-use UFI::Centres;
+use UFI::CentresCSV;
 
 # make sure SITE_DIR is set since MKDoc->init needs it
 die "SITE_DIR isn't set.  Please source mksetenv.sh from an installed ".
@@ -55,16 +55,18 @@
    Sun_OpenHours, Mon_OpenHours, Tue_OpenHours, Wed_OpenHours,
    Thu_OpenHours, Fri_OpenHours, Sat_OpenHours, 
    WeekEnds_OpenHours, WeekDays_OpenHours,
-   OpenToPublic, NumWorkstations) 
+   OpenToPublic, NumWorkstations, 
+   Normalised_Centre_Name, Normalised_Postcode) 
 VALUES 
-  (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+  (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
 END
 my @centre_insert_fields = 
   qw(ID CentreName Address1 Address2 Address3 
      Town County Postcode Status CentreTelNo CentreEmail CentreWebsite
      Charges Sun_OpenHours Mon_OpenHours Tue_OpenHours Wed_OpenHours
      Thu_OpenHours Fri_OpenHours Sat_OpenHours 
-     WeekEnds_OpenHours WeekDays_OpenHours OpenToPublic NumWorkstations);
+     WeekEnds_OpenHours WeekDays_OpenHours OpenToPublic NumWorkstations
+     Normalised_CentreName Normalised_Postcode);
 
 # insert handle for contacts
 my $contact_insert_sth = $dbh->prepare(<<END);
@@ -109,7 +111,7 @@
   
 
 # get a list of centre IDs
-my $centres = UFI::Centres->new($ENV{SITE_DIR} . '/UFI-Centres-data.txt');
+my $centres = UFI::CentresCSV->new($ENV{SITE_DIR} . '/UFI-Centres-data.txt');
 $centres->Read;
 
 my $ids = $centres->get_all_ids();


More information about the MKDoc-commit mailing list