RE: [greenstone-devel] Retrieving a page from greenstone

From Gregory S. Williamson
DateSun, 3 Aug 2003 23:42:04 -0700
Subject RE: [greenstone-devel] Retrieving a page from greenstone
Thanks for the tip; the .xml files have the info I need.

Since I have a few dozen directories (in my test case) and this is on a Windows machine, I am at a bit of a loss as to how to find the hash code for a given document ... I could accumulate all of the relevant lines from the .xml files (<Metadata name="Identifier">HASH010ddaf18d9e03d233379b41</Metadata>, etc.) and put them into a dbm or other easily searched format. Or code a tool that searches .xml files in directories (and sub-directories, and perhaps sub-sub-directories ?) for the proper .xml file and then extract the hash.

I was wondering, I suppose, if there is a function call that, given a file name would calculate the hash. I've been poking through various perl modules without luck so far ... (slightly slow going, lots of neat aspects to the code).

Thanks for the help,

Greg Williamson

-----Original Message-----
From:Katherine Don [mailto:kjdon@cs.waikato.ac.nz]
Sent:Sun 8/3/2003 3:25 PM
To:Gregory S. Williamson
Cc:greenstone-devel@list.scms.waikato.ac.nz
Subject:Re: [greenstone-devel] Retrieving a page from greenstone

hi greg,

I am assuming that you want to click on a point in the map and go directly to a document. if not, please ignore the following stuff.

to display documents, the greenstone cgi arguments are like
a=d&c=demo&d=HASH01d242dc3e08e1fdcf7343bb

where c specifies the collection name, and d specifies the document identifier.

if you know the identifiers of the documents (and these are specified in the archives doc.xml files), you can easily link to them from your map.

hope this helps,
Katherine Don


"Gregory S. Williamson" wrote:

> Dear peoples,
>
> I've got a Greenstone installation running happily on a local server with some sample pages in it.
>
> I've got another application (a map) which has some points which relate to specific pages in Greenstone. I'd like to be able to have my map user click on a point and end up seeing the page displayed by Greenstone. Ideally our data points will store the file name of interest and the Mapserver application will format that file name into a string for Greenstone or some intermediate program.
>
> I can see a couple of ways to go (for instance, hack the query page so if only item is found, greenstone automatically pops to that page rather than requiring the user to click on the document icon), but I am wondering if I am approaching this the right way.
>
> The cgi configurations for showing a page seem to be for showing macros rather than being used to show a document based on title, but I confess that I have not yet experimented with a lot of variants.
>
> I would like (for now) to be able to do this using perl/cgi scripting rather than writing a C/C++ module.
>
> Does anyone have any tips,pointers or other advice on this ?
>
> Thanks,
>
> Greg Williamson
> gsw@shapingsf.org
>
> _______________________________________________
> greenstone-devel mailing list
> greenstone-devel@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel