Modifying Strings and SysStrings

From LaneWiki

Jump to: navigation, search

Project:Documentation > Modifying Strings and SysStrings


Strings and SysStrings store L’âne’s configuration information in a fashion similar to Perl hashes: That is a single key (we call it id) points to a single value (data).

Managers can modify Strings, as these values typically contain information like receipt headers and footers, while SysStrings must be modified by a sysadmin/db admin (depending on your delegation of authority). SysStrings contain configuration information.

Contents

Command-line Modification

L’âne contains command-line tools in LanePOS/backOffice/utilities/ to view and modify the data stored in both Strings and SysStrings.

To read the information in a string/sysstring named “my-string-id”, one uses either:

./cat-strings my-string-id

or

./cat-sysStrings my-string-id

To update or create a string/sysstring named “my-string-id”, one uses either:

./update-strings my-string-id < file-containing-the-data

or

./update-sysStrings my-string-id < file-containing-the-data

All four of these tools read or write to STDIN/STDOUT, so they support standard Unix redirection operators and pipes. See Wikipedia:Pipeline_(Unix)#Pipelines_in_the_CLI for a brief discussion of Unix pipelines.

GUI Modification

Furthermore, L’âne contains graphical tools in LanePOS/backOffice/tkOffice to view and modify the data stored in both Strings and SysStrings.

Strings: http://www.heinous.org/lanepos-strings_register-touch-menusetup.jpg

SysStrings: http://www.heinous.org/lanepos-strings_register-touch-functionpagesetup.jpg

To open a value, type the id in the ID field, and press <Return>. After making your changes, press Process to save them.

Tricks

You can use the command-line tools to copy a single String or SysString between datasets. For example, to copy SysString:register-initMachine-default from the dataset mystore to yourstore:

On The Same Machine

 LaneDSN="dbname=mystore" ./cat-sysStrings register-initMachine-default | LaneDSN="dbname=yourstore" ./update-sysStrings register-initMachine-default

On Another Machine

/opt/LanePOS/backOffice/utilities/cat-sysStrings register-initMachine-default | ssh username@hostname /opt/LanePOS/backOffice/utilities/update-sysStrings register-initMachine-default
Personal tools