[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [445] trunk
- Subject: SF.net SVN: ledger-smb: [445] trunk
- From: ..hidden..
- Date: Tue, 31 Oct 2006 20:49:30 -0800
Revision: 445
http://svn.sourceforge.net/ledger-smb/?rev=445&view=rev
Author: einhverfr
Date: 2006-10-31 20:49:28 -0800 (Tue, 31 Oct 2006)
Log Message:
-----------
Adding outline of an experimental CLI wrapper
Modified Paths:
--------------
trunk/Changelog
Added Paths:
-----------
trunk/utils/cli/
trunk/utils/cli/ledgersmb_cli.pl
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2006-11-01 04:32:48 UTC (rev 444)
+++ trunk/Changelog 2006-11-01 04:49:28 UTC (rev 445)
@@ -58,6 +58,7 @@
Other:
* ledger-smb.conf is now an ini file (Seneca)
+* Experimental scripting wrapper in utils/cli (Chris T)
Changelog for LedgerSMB 1.1.1
Added: trunk/utils/cli/ledgersmb_cli.pl
===================================================================
--- trunk/utils/cli/ledgersmb_cli.pl (rev 0)
+++ trunk/utils/cli/ledgersmb_cli.pl 2006-11-01 04:49:28 UTC (rev 445)
@@ -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";
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.