diff options
-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"; + } +} |