DrawMGT Data Migration and Configuration Tools
Contents
Message Catalog Merging
Use the tool: lib/etc/mergeMessageCatalog.pl
This replaces all messages in a specific language in a message catalog file.
Example: In this case the Message-ABT.txt file is a new file with new French messages in it.
cd app/config ../../lib/etc/mergeMessageCatalog.pl -c Messages.txt -l fr_FR Message-ABT.txt > Messages-New.txt diff Messages.txt Messages-New.txt
CSV File Parsing
CSV Parse Perl Module
- CSV and tab-separated files created by Excel can have carriage returns in individual cells.
- There is a perl module: CSV, which is able to parse this.
rath.ca/Misc/Perl_CSV - Description and instructions
rath.ca/Misc/Perl_CSV/CSV-2.0.html - Perl documentation for the module
rath.ca/Misc/Perl_CSV/CSV-2.0.tar.gz - Source file
- Installation of the module: As root on a Unix/Linux system:
cd /tmp tar xvf CSV-2.tar perl Makefile.PL make make test make install
Test to make sure it works: The following could should not output any error messages:
perl -e 'use CSV;'
DrawMGT Tool genComment.pl
app/etc/genComment.pl could be used as a basis for generating SQL statements from .txt files.
- Currently hard coded to generate comment records based on a template (expressed in Perl) that gives
- default values for the Comments records.
- Reads (via the -r option) the PHP instance and site settings to get the system database name and password.
Reads reference data tables from the database (subroutine getUserInitialsMap)