[freeside-commits] freeside/bin cdr.import,NONE,1.1

Ivan,,, ivan at wavetail.420.am
Mon Jun 23 15:11:24 PDT 2008

Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv7551

Added Files:
Log Message:
add quick command line too for CDR imports

--- NEW FILE: cdr.import ---
# Usage:
#  cdr.import user format <filename

use strict;
use FS::UID qw(adminsuidsetup);
use FS::cdr;

my $user = shift or die &usage;
adminsuidsetup $user;

my $format = shift or die &usage;

my $error = FS::cdr::batch_import( {
  'filehandle' => *STDIN{IO},
  'format'     => $format,
} );
die $error if $error;

sub usage {
  "Usage: \n  cdr.import user format <filename\n";

More information about the freeside-commits mailing list