Path: | README |
Last Update: | Sat Nov 26 19:58:30 GMT+9:00 2005 |
$Id: README,v 1.6 2005/11/26 10:58:30 noir Exp $
SimpleZDB - a ruby extension module providing the simple access to ZDB Copyright (C) 2005 Hiroyuki KUROSAKI <noir (at) st . rim . or . jp>
"SimpleZDB" is a Ruby extension which provides access to the PIM database of Sharp Zaurus(TM).
See the comment in the source code (simplezdb.cpp) for details. You can get the HTML document using rdoc command.
rdoc simplezdb.cpp
require 'simplezdb' include SimpleZDB DataBase.open(DataBase::ADDRESSBOOK) do |db| db.each do |contact| if contact.categories.include?("Friend") then puts contact["FULL"] end end end
require 'simplezdb' module SimpleZDB class Contact < Card def fullname self["FULL"] end end class Addressbook < DataBase def initialize(*args) is_readonly = args.shift super(DataBase::ADDRESSBOOK, is_readonly, Contact, *args) end end end Addressbook.open(true) do |db| db.each do |contact| if contact.categories.include?("Friend") then puts contact.fullname end end end
For convenience, this package includes the executable extention file (simplezdb.so). If you want to modify this extention and to build it yourself, follow the steps below.
ruby extconf.rb --with-qte-dir=/opt/Qtopia/sharp
CXX=arm-linux-g++ make
If you don’t have Ruby installed on your Zaurus, get ruby_1.8.0-1_arm.ipk from the following page and install it. sourceforge.jp/projects/zaurus-ja/files/
I recommend using ipkg installer. If you prefer installing it manually, follow the steps below.
ruby ./test_simplezdb.rb
Zaurus is a trademark of Sharp Electronics.
Hiroyuki KUROSAKI <noir (at) st . rim . or . jp>
GNU General Public License Version 2.
See the COPYING file for details.
Thanks to kenji for Ruby install package for Zaurus.
Thanks to Hidaka Takahiro for Ruby/Qte. takahr.dhis.portside.net/cgi-bin/rwiki.cgi?cmd=view;name=Ruby%2FQte
Thanks to yakty for zdbat. This extention owes much for the the source code of zdbat and the relating information in his wiki page: tbox.jpn.org/wiki/linuzau/wiki.cgi?zdbat
Thanks to ichitokumei for Qualendar. The source code includes much information, especially on database filter method. ichitokumei.hp.infoseek.co.jp/qualendar/