]> lifelog.hopto.org Git - LifeLog.git/commitdiff
New CNF Development.
authorWill Budic <redacted>
Mon, 17 Feb 2020 19:14:33 +0000 (06:14 +1100)
committerWill Budic <redacted>
Mon, 17 Feb 2020 19:14:33 +0000 (06:14 +1100)
dbLifeLog/database.cnf
dbLifeLog/databaseAnonsTest.cnf [new file with mode: 0644]
dbLifeLog/databaseInventory.cnf [new file with mode: 0644]
dbLifeLog/databaseInventoryDATA.cnf [new file with mode: 0644]
htdocs/cgi-bin/configFileTester.pl [deleted file]

index 0ad6952207169b9a952ec3957bb023a3998821dc..db60ee90f5da5a956802d70c8f30a94502d0c502 100644 (file)
@@ -1,9 +1,14 @@
 
+!CNF1.1
 This is the main configuration file for the LifeLog applications settings.
 https://github.com/wbudic/LifeLog
 This is an Open Source License project -> https://choosealicense.com/licenses/isc/
 The credential format:<<AUTO_LOGIN <{alias}/{password}> , dont enable here using AUTO_LOGIN option bellow, use config in app.
-<<AUTO_LOGIN<>>
+<<AUTO_LOGIN<Value>>>
+# List command anon with the name of 'list_cmd'.
+<<list_cmd<
+ls -lh $$$1$$$|sort
+>>>
 <<<CONST
 $RELEASE_VER = 1.8
 $SYS_1 =    10
@@ -14,7 +19,9 @@ $SYS_3 =      "   Some Nice Text!   "
 Multiple lines
 in this txt
 is placed as a const.
->>
+>>>
+
+
 
 <<LOG<TABLE
     ID_CAT TINY NOT NULL,
diff --git a/dbLifeLog/databaseAnonsTest.cnf b/dbLifeLog/databaseAnonsTest.cnf
new file mode 100644 (file)
index 0000000..27c6c49
--- /dev/null
@@ -0,0 +1,49 @@
+!CNF1.1
+<<list_cmd<ls -lh $$$1$$$|sort>>>
+<<LS<
+ls -l
+>>>
+<<prop_test1<dir>>>
+<<not_prop-test2<dir>>>
+<<not_prop-test3<dir>>>
+<<not_prop-closed1<
+ls -l
+>>
+<<not_prop-closed2<dir>>
+
+<<proper1< have a nice day! >>>
+<<proper2<
+very much too!
+>>>
+<<<CONST $DEF_PHONE_LINE=1800 800 xxx>>>
+
+<<$HELP<CONST
+Multiple lines
+in this text.
+>>>
+
+
+<<MyTemplate<
+
+Dear $$$SALUTATION$$$ $$$NAME$$$,
+
+We are writting to you to unfortunatelly advise you.
+That your application for an loan of $$$AMOUNT$$$, has been declined.
+
+Our assesment has made you not satify the $$$CRITERIA$$$ criteria.
+As outlined in our approval policy.
+
+Please find enclosed, our approval criteria booklet.
+Giving you a more precise and accurate requirments and information.
+
+Looking forward, in future business with you.
+
+Sincerely your Mike Dolittle
+Policy Approval Manager
+Head Office Acme Bank Corporation Holdings Global
+(p.h. $$$DEF_PHONE_LINE$$$)
+
+
+>>>
+
+<<GET_SUB_URL<https://www.$$$1$$$.acme.com/$$$2$$$>>>
\ No newline at end of file
diff --git a/dbLifeLog/databaseInventory.cnf b/dbLifeLog/databaseInventory.cnf
new file mode 100644 (file)
index 0000000..c90f4f5
--- /dev/null
@@ -0,0 +1,56 @@
+!CNF1.1
+Sample database and data. Presentnting a Inventory database of itmes. Having multiple categories.
+<<<CONST
+$LOGIN_USER=admin
+$LOGIN_PASS=admin
+$DATABASE=data_inventory.db
+$RELEASE_VER = 1.0
+$AUTOLOAD_DATA_FILES = 1 `Auto loads included data holding config files.
+>>
+
+<<CATS<TABLE
+    ID TINY PRIMARY KEY NOT NULL,
+    NAME VCHAR(16),
+    DESCRIPTION VCHAR(128)
+>>
+
+<<ITEMS<TABLE
+    DATE DATETIME  NOT NULL,
+    NAME VCHAR(64) NOT NULL,
+    CATS VCHAR(24) DEFAULT '01',
+    AMOUNT DOUBLE DEFAULT 0
+>>
+
+
+<<CATS<DATA
+01`Unspecified`For quick uncategorised entries.~
+03`File System`Operating file system/Application short log.~
+06`System Log `Operating system important log.~
+09`Event`Event that occurred, meeting, historically important.~
+28`Personal`Personal log of historical importance, diary type.~
+32`Expense`Significant yearly expense.~
+35`Income`Significant yearly income.~
+40`Work`Work related entry, worth monitoring.~
+45`Food`Quick reference to recipes, observations.~
+50`Music`Music reference of interest. Youtube embbed.~
+52`Sport/Club`Sport or Social related entry.~
+55`Cars`Car(s) related entry.~
+60`Online`Online purchases (ebay, or received/ordered from online source).~
+62`Utility`Bill, house utility type expense.~
+64`Goverment`Goverment event of all events.
+Be a wise voter.~
+>>
+
+<<ITEMS<DATA
+01-01-2020 12:30:00`Gas Bottle.`39.0`32,62~
+01-02-2020 13:00:00`Car rego \`service, new 2 tires.`513.0`32,55~
+>>
+
+/**
+ * Following file contains rest of data for ITEMS table.
+ */
+<<DATA<FILE
+databaseInventoryDATA.cnf
+>>>
+
+
diff --git a/dbLifeLog/databaseInventoryDATA.cnf b/dbLifeLog/databaseInventoryDATA.cnf
new file mode 100644 (file)
index 0000000..5f64215
--- /dev/null
@@ -0,0 +1,8 @@
+!CNF1.1
+Sample database data tagged properties.
+See databaseInventory.cnf for data structure.
+<<ITEMS<DATA
+13-02-2020 11:50:50`First file base entry.`0`0~
+01-02-2020 13:00:00`Car rego \`service, new 2 tires.`513.0`32,55~
+false`false`0`0~
+>>
diff --git a/htdocs/cgi-bin/configFileTester.pl b/htdocs/cgi-bin/configFileTester.pl
deleted file mode 100755 (executable)
index 11628d6..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Programed by: Will Budic
-# Open Source License -> https://choosealicense.com/licenses/isc/
-#
-use strict;
-use warnings;
-use Try::Tiny;
-
-use DateTime;
-use DateTime::Format::SQLite;
-use DateTime::Duration;
-use Text::CSV;
-
-#DEFAULT SETTINGS HERE!
-use lib "system/modules";
-
-use lib $ENV{'PWD'}.'/htdocs/cgi-bin/system/modules';
-require CNFParser;
-
-my $cnf = CNFParser->new();
-
-$cnf->parse($ENV{'PWD'}."/dbLifeLog/database.cnf");
-
-foreach ($cnf->SQLStatments()){
-    print "$_\n";
-}
-foreach my $p ($cnf->constants()){
-
-    print "$p=", $cnf->constant($p),"\n";
-}
-# foreach (sort keys %ENV) {
-#   print "$_= $ENV{$_}\n";
-# }
-
-### CGI END
-1;