[LibX] how to share databases in LibX, and how to use POST in custom catalogs

LibX Project libx.org at gmail.com
Tue Oct 16 20:40:14 PDT 2007


First, I should point out that the resources Drew has configured can
now be included into other editions.

To do that, choose the "Catalogs" tab, and type in, for instance,
"search.eb.com" after which you will receive a message that says:

Found catalog 'Encyclopedia Britannica' in database (from edition
'Tompkins Cortland Community College Library Edition')

with an Add button next to it. If you click "Add", the resource can be
imported (and further customized.) [ Note that the resource is copied,
not linked, so further changes Drew might make would not affect your
edition. ]

For reference, the actual syntax Drew's customized can be found in the
<bookmarklet> entries in this file:
and the test page is here:

To address Drew's question. Resources that do not include the search
terms in the URL use what is known as the "POST" method when sending a
search request. (Including searchterms in the URL is known as the
"GET" method.)

Many servers support both "GET" and "POST." For those servers, you can
turn the submission form from one that uses "POST" into one that uses
"GET." To do that, download Chris Pederick's web developer extension
from here: http://chrispederick.com/work/web-developer/
Once installed, visit the site where you would normally search the resource.
Then select "Forms" -> Convert -> POST to GET.  Subsequently, do a
search. If the search fails, the server does not support GET. If it
works, you can configure it as a bookmarklet by copying and pasting
the URL.

The important point is that just because the default HTML form uses
the "POST" search form, we cannot infer that the resource doesn't
support "GET". If it supports GET also, we can configure it right

Resources that do not support GET cannot currently be configured as
bookmarklets. However, I just now added support for POST for custom
catalogs. (See my earlier post on how to configure custom catalogs -
it does require javascript programming.)  To use POST in a custom
catalog, the catalog should return an array [ url, postdata ] (instead
of a simple URL as for GET) when its makeSearch method is invoked.
The "postdata" argument is a string in GET syntax, as in
name1=value&name2=value2... etc.  An example is shown here:

If it turns out that there a many resources out there that do not
support GET, we could also add a way to support POST for bookmarklets
(this would require adding a flag and a checkbox in the edition
builder, and possibly some marker to separate the bookmarklet URL
template in the url and the postdata part. (*))  However, I would
implement that only if a proven need exists (in other words, if there
are important resources that cannot be reached via GET.)

 - Godmar

(*) Note that the ? cannot be used to separate URL and postdata, since
GET and POST can be combined: some arguments may appear in the URL,
and others in the body of the http request header.

On 10/16/07, Bill Drew <dreww at tc3.edu> wrote:
> I have created a version of LibX for my library at
> http://libx.org/editions/download.php?edition=5051E541.
> It includes many databases that I got to work using the bookmarklet
> feature of the edition builder.  Is there any way to get databases that
> do not send a search as part of the URL to work in LibX?  In particular
> I am thinking of Ebsco, Elsevier, OCLC FirstSearch, and many of the Gale
> products.
> I would also like some input on what I have done.  My goal is to get
> the majority of our databases to work with LibX.  We have FireFox
> installed on all computers on campus as well as IE.
> Wilfred (Bill) Drew
> Assistant Professor
> Librarian, Systems and Tech Services
> Tompkins Cortland Community College  (TC3) Library:
> http://www.tc3.edu/library/
> Room 256A
> 170 North St.
> P.O. Box 139
> Dryden, N.Y. 13053-0139
> E-mail: dreww at tc3.edu
> bill.drew at gmail.com
> Phone: 607-844-8222 ext.4406
> AOL Instant Messenger:BillDrew4
> My Wiki: http://billdrew.pbwiki.com
> My Blog:http://babyboomerlibrarian.blogspot.com
> Al Gore quoting an African proverb: "If you want to go quickly, go
> alone. But if you want to go far, go together."
> _______________________________________________
> Libx mailing list
> Libx at mozdev.org
> http://mozdev.org/mailman/listinfo/libx

More information about the Libx mailing list