--LXx4g46d83wF7unj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Dave Thomas (dave / pragmaticprogrammer.com) wrote:
> From Rael Dornfest's blog (http://www.raelity.org/) we have

> DBD::Google is a Perl module providing database-like interaction with 
> the Google Web API .

Like I said before, that's damn cool.  So here's my preliminary
implmenetation in Ruby (using Rubu-Google):

http://www.pablotron.org/download/dbd-google-ruby-pre-20030215.tar.gz

And here's a sample script:

--
#!/usr/bin/ruby

require 'dbi'

# read user key
user = File.open("#{ENV['HOME']}/.google_key") {|kf| kf.readline.chomp}

# connect to google
dbh = DBI::connect('dbi:Google:google', user, '')

# prepare query
s = dbh.prepare('select title,url from google where q = "pablotron"')
s.execute

# fetch results
while row = s.fetch
  puts row.join ',' 
end
--

# ./test.rb 
<b>Pablotron</b>: News,http://www.pablotron.org/
<b>Pablotron</b>: Imlib2-Ruby,http://www.pablotron.org/software/imlib2-ruby/
<b>Pablotron</b>: Reviews: Nautilus PR2,http://www.pablotron.org/reviews/nautilus-PR2/
<b>Pablotron</b>: Xmms-Ruby,http://www.pablotron.org/software/xmms-ruby/
<b>Pablotron</b>: FAM-Ruby,http://www.pablotron.org/software/fam-ruby/
<b>Pablotron</b>: Bash Tweaks,http://www.pablotron.org/software/bash_tweaks/
<b>Pablotron</b>: Reviews : Michael Jackson's Moonwalker,http://www.pablotron.org/reviews/moonwalker/
<b>Pablotron</b>: Resume,http://www.pablotron.org/resume/
<b>Pablotron</b>: About,http://www.pablotron.org/about/
<b>Pablotron</b>: CVS,http://www.pablotron.org/cvs/

I still have to do some documentation, and improve the query string
parsing a little bit, but that shouldn't take more than a couple of
days.

-- 
Paul Duncan <pabs / pablotron.org>        pabs in #gah (OPN IRC)
http://www.pablotron.org/               OpenPGP Key ID: 0x82C29562

--LXx4g46d83wF7unj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+TsDBzdlT34LClWIRAr/qAKCg8pg9ftlNt1s07YMQPINF+BgMKACgr1AL
ebxfXmf1aYExeDoZBR0AmigPoY
-----END PGP SIGNATURE-----

--LXx4g46d83wF7unj--