The Right 1 column of the access counter is

About PalmSync

To visitors from search engines:
If you're searching for information about using palm with Netscape, this page have nothing to do with you.

Update topic

version 1.13.3
Fixed SEGV from PalmTodo.new()
Fixed mis-definition of PalmFile#record_by_Id

Abstract

"PalmSync" is a Ruby(Scripting Language) library for syncing your PalmPilot with DBMS(MySQL and so on). You can also read/modify/create records in your PalmPilot using Ruby script in PalmSync.
Now supported reading pdb/prc file (just started work). PalmSync package contains some Ruby scripts and Ruby extention library for pilot-link.
I'm sorry I have no English manual now. Do you need them? -> English README available now.


Features


Release Note

Each version has been fixed a lot of bugs...
v1.13.3
fixed SEGV,and one mis-definition.
v1.13.2
fixed potential of bugs and warnings.
v1.13.1
fixed runtime unresolved symbol 'StringValue' in some method defined in palmutil.c.
modified using STR2CSTR() to StringValuePtr()
v1.13
added PalmInfoCategory#setRenamed(index,flag) and fixed some potential of bugs.
v1.12
bug fix of PalmDB#writeAppBlock and addition of PalmAddressInfo#setRenamed
v1.11
PalmAddress supports showphone and phoneLabel[5]
v1.10
USB connection supported
v1.9.1
Fixed bug in PalmFile#each.
v1.9
Start pdb file support.(now only reading)
Fixed enumeration bugs in PalmDB#each** methods.
v1.8.1c
Fixed bug in PalmPilot#fetchFile and FileSimpleConduit#dump
v1.8.1b
Fixed a bug that make exception when AddressDB is updated in DBMS.
v1.8.1a
Deleted left debug code.
v1.8.1 Bug Fixes
PalmDB#each_modified can cause SEGV.
PalmDB#each_inCategory's function was not that was expected. ->fixed.
Old PalmDB#each_inCategory's function is moved to PalmDB#each_modified_inCategory
v1.8
Table definition of ToDoDB is modified. please add a column on your table in the database. See db/ToDoDBUpdate.sql to add it.
v1.7
Category sync-ing supported. You must add a table in your database for it. See db/DBCategory.sql to understand the table and see ./sync script to know how to sync categories.

Requirement

CVS

You can obtain PalmSync from sourceforge. sourceforget project page
SourceForge.net Logo


Examples

No description here, but I know you can understand them.

Usage of Low Level Classes

 require 'palm'
 pa=PalmPilot.new("/dev/pilot")
 db=pa.openDB("MemoDB")
 for rec in db
   print rec.contents # Only MemoDB can be handled like this
 end
 pa.closeDB(db)
 pa.close

Usage of Interpreter Classes

 require "palm"
 require "PalmStdInterpreters"

 pa=PalmPilot.new("/dev/pilot") 

 db=pa.openDB("TodoDB")
 for rec in db
    todo=PalmTodoInterpreter.new(rec.contents)
#  original access method
#    ar=todo.getDataArray
#    print ar[2],"\n"
    print todo.description,"\n"
 end

 pa.closeDB(db)
 pa.close
 exit

Usage of PalmSync class

 require "PalmSync"
 require "mysqldb"
 require "filedb"

 $mysqlHost="dokoka"
 $mysqlUser="dareka"
 $mysqlPass="nanika"
 # $mysqlDebug=1

 s=PalmSync.new
 s.setConduit("AddressDB",DefaultConduit,PalmAddressInterpreter,
              MysqlDB,"AddressDB",nil)

 s.setConduit("MemoDB",DefaultConduit,PalmMemoInterpreter,
              MysqlDB,"MemoDB",nil)

 s.sync_these([ "MemoDB", "AddressDB" ])

 s.writeLog("PalmSync Sample")
 s.disconnect

Usage of PalmFile class

require 'palm'
pdb = PalmFile.open("MemoDB.pdb")

pdb.each do |r|
  puts "\n\n" +
       "memo :\n" + r.contents
end


Email: nyasu@osk.3web.ne.jp
Your comments are welcome.