diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-01 04:49:28 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-01 04:49:28 +0000 |
commit | 2bebecbfe9d4d85e79e5be176bcaa83890c7984f (patch) | |
tree | ca8d563fd2a3043800138655505edae58d8d6943 | |
parent | b2b02c07bf6e37c45bcb72d6414a2e1c16313251 (diff) |
Adding outline of an experimental CLI wrapper
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@445 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | utils/cli/ledgersmb_cli.pl | 21 |
2 files changed, 22 insertions, 0 deletions
@@ -58,6 +58,7 @@ User Interface: Other: * ledger-smb.conf is now an ini file (Seneca) +* Experimental scripting wrapper in utils/cli (Chris T) Changelog for LedgerSMB 1.1.1 diff --git a/utils/cli/ledgersmb_cli.pl b/utils/cli/ledgersmb_cli.pl new file mode 100644 index 00000000..72e4e2f7 --- /dev/null +++ b/utils/cli/ledgersmb_cli.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +# This is a simple wrapper that allows you to write simple scripts with LSMB +# See sample for the file format. + +use LedgerSMB::User; +use LedgerSMB::Form; +use LedgerSMB::Sysconfig; + +$form = new Form; + +while ($line = <>){ + if ($line =~ /^\s*CALL (.+) INTO (.+)/){ + $form->{$2} = %${$1}; + } elsif ($line =~ /^\s*MODULE (.+)/){ + } elsif ($line =~ /^\s*ENV:(.+)\s*=\s*(.*)/){ + } elsif ($line =~ /^\s*(.+)\s*=\s*(.+)/){ + } else { + die "Parse error in script file: $line"; + } +} |