X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=unicorn%2Funicorn_to_tsv.pl;h=a6cdf475229b736110fb78da2f7e9b99e0232491;hp=7ba2d7a017b122fc030194804ac15e5a7d7cbadb;hb=ac8cf43894d7a36c769781df6aef792ef61a64bc;hpb=2c77c40a58e27d82a3af2d6a6ed23fd2f6da163e diff --git a/unicorn/unicorn_to_tsv.pl b/unicorn/unicorn_to_tsv.pl index 7ba2d7a..a6cdf47 100755 --- a/unicorn/unicorn_to_tsv.pl +++ b/unicorn/unicorn_to_tsv.pl @@ -1,5 +1,21 @@ #!/usr/bin/perl -w +# Copyright 2009-2012, Equinox Software, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + # Converts a Unicorn users.data, bill.data, or charge.data file to a tab-separated file. # 2009-08-10 Ben Ostrowsky @@ -53,7 +69,7 @@ while (<>) { # Looks like we've got some actual data! Let's store it. # FIXME: For large batches of data, we may run out of memory and should store this on disk. - if ( /^\.(.*?).\s+(\|a)?(.*)$/ ) { + if ( /^\.([A-Z0-9_\/]+?)\.\s+(\|a)?(.*)$/ ) { # Build the name of this field (taking note of whether we're in a named section of data) $field = '';