lymelib2db ========== 1.4 lymelib2db is a utility for SysQuake and Matlab which lets you convert a set of LyME libraries to a PDB file ready to be uploaded to the Palm. It may be used on any computer which supports SysQuake or Matlab. Introduction ------------ SysQuake and Matlab are desktop scientific applications running on desktop computers. LyME is a Matlab-compatible application running on Palm handheld computers. Programs for LyME are stored as source code (text) in the records of a database inside the Palm. This database may be created on the desktop computer by converting text files (one per record) using lymelib2db. Each file contains either a set of (related) functions, called a library, or a sequence of statements, called a script. Because of limitations of the Palm OS text fields used by LyME, LyME cannot edit records larger than a few thousands characters. However, the limit of the size of records is much higher (about 64000 characters). Using lymelib2db ---------------- lymelib2db implements the following function: lymelib2db({inputfile1, inputfile2, ...}, outputfile, databasename) where the first argument is a list of paths (strings) to the input files (libraries and scripts), the second argument is the path of the PDB database file created by lymelib2db, and the third argument is the database name as a string. Since the database is merged with LyME main database the next time LyME is run, this name is not crucial; you should choose one which is unique to your library or set of libraries. Here are ways to use lymelib2db: With Matlab: -put in a folder all the text files you want to have in the library -add the folder of lymelib2db to the paths of Matlab -cd to the folder where the text files are located -type the following commands: p=pwd;if p(end)~=filesep,p(end+1)=filesep;end f=dir;ff={}; for i=1:length(f);if f(i).name(1)~='.',ff{end+1}=[p,f(i).name];end;end [f,p]=uiputfile('newlymedb.pdb','Save as LyME database'); if p(end)~=filesep,p(end+1)=filesep;end lymelib2db(ff,[p,f],'lib'); when a dialog box is displayed, type the file name and choose a location for the PDB file, which should end with a .pdb suffix. With SysQuake (not SysQuake LE, which doesn't implement low-level file i/o): -open lymelib2db.m -in the command window, type the following commands: ff={};while true; f=getfile; if isempty(f);break;end;ff{end+1}=f;end lymelib2db(ff,putfile,'lib'); when a dialog box is displayed, select the first file to add to the database, then the second file, and so on; then click Cancel, type the file name a choose a location for the PDB file (which should end with a .pdb suffix) and click OK. To create the library databases provided with LyME, commands like the following one have been typed in the Command Window of SysQuake: lymelib2db({getfile},putfile,'stdlib') When dialog boxes appear, the files stdlib.lml and control.lml were selected, then the database name lymelib.pdb was typed. Uploading the PDB file to the Palm ---------------------------------- To install the databases, use the Install feature of the HotSync application. License ------- lymelib2db and its documentation: Copyright 2001, Yves Piguet. All rights reserved. lymelib2db may not be redistributed without LyME (consequently, you should comply with LyME's license). The user assumes all the risks caused by the use of lymelib2db. Under no circumstance will Yves Piguet, Calerga, or resellers be responsible for any loss of money, time, data, goods, or lives. Yves Piguet http://www.calerga.com 17 August 2001