N
Nikolai Weibull
(WARNING: This is a lazy-pants announcement. All I=E2=80=99ve done is
:r doc/README and added a couple of headings.)
Net:
ICT README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Introduction
------------
Net:
ICT is a library for Ruby that implements the client-side of the
Dictionary Server Protocol (DICT), described in
http://ietf.org/rfc/rfc2229.txt[RFC2229]. Documentation of the project
is provided in RDoc form, and can be generated by running the
`doc`-target of the Rakefile.
Authors
-------
Nikolai Weibull <[email protected]>
News
----
0.9.0
~~~~~
Initial release.
Download
--------
A gem can (temporarily) be found at http://bitwi.se/net-dict-0.9.0.gem
You can also git the source at http://git.bitwi.se/
Examples
--------
A couple of examples follow.
Define a word:
require 'net/dict'
dict =3D Net:
ICT.new('dict.org')
dict.client =3D 'Ruby-Net:
ICT example'
puts dict.define('ruby', 'foldoc')[0]
dict.disconnect
Define a word using a pipeline (less traffic):
require 'net/dict'
dict =3D Net:
ICT.new
definitions, _ =3D dict.pipeline do
dict.connect('dict.org')
dict.client =3D 'Ruby-Net:
ICT pipeline example'
dict.define('ruby', 'foldoc')
dict.disconnect
end
puts definitions[0]
Get a list of databases on the server using a session (execute a
pipeline):
require 'net/dict'
=20
dbs, _ =3D Net:
ICT.session('Ruby-Net:
ICT db example', 'dict.org') d=
o |dict|
dict.databases
end
dbs.each{ |db, description| puts "#{db}: #{description}" }
Net:
ICT also integrates with the URI and open-uri libraries:
require 'net/dict'
require 'uri/dict'
require 'open-uri'
open('dict://dict.org/d:word'){ |file| puts file.read }
A dict client using this library is being written, but nothing=E2=80=99s
stopping you from writing your own in the meantime ;-).
nikolai
--=20
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
:r doc/README and added a couple of headings.)
Net:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Introduction
------------
Net:
Dictionary Server Protocol (DICT), described in
http://ietf.org/rfc/rfc2229.txt[RFC2229]. Documentation of the project
is provided in RDoc form, and can be generated by running the
`doc`-target of the Rakefile.
Authors
-------
Nikolai Weibull <[email protected]>
News
----
0.9.0
~~~~~
Initial release.
Download
--------
A gem can (temporarily) be found at http://bitwi.se/net-dict-0.9.0.gem
You can also git the source at http://git.bitwi.se/
Examples
--------
A couple of examples follow.
Define a word:
require 'net/dict'
dict =3D Net:
dict.client =3D 'Ruby-Net:
puts dict.define('ruby', 'foldoc')[0]
dict.disconnect
Define a word using a pipeline (less traffic):
require 'net/dict'
dict =3D Net:
definitions, _ =3D dict.pipeline do
dict.connect('dict.org')
dict.client =3D 'Ruby-Net:
dict.define('ruby', 'foldoc')
dict.disconnect
end
puts definitions[0]
Get a list of databases on the server using a session (execute a
pipeline):
require 'net/dict'
=20
dbs, _ =3D Net:
o |dict|
dict.databases
end
dbs.each{ |db, description| puts "#{db}: #{description}" }
Net:
require 'net/dict'
require 'uri/dict'
require 'open-uri'
open('dict://dict.org/d:word'){ |file| puts file.read }
A dict client using this library is being written, but nothing=E2=80=99s
stopping you from writing your own in the meantime ;-).
nikolai
--=20
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}