RE: [greenstone-users] Linking to pdfs only

From Yachnes, Paul
DateMon, 19 Dec 2005 16:42:40 -0500
Subject RE: [greenstone-users] Linking to pdfs only
If I modify collect.cfg as suggested and simply refresh the browser, it
has no effect. If I close and reopen Greenstone, then Greenstone
modifies collect.cfg back to its original state, removing my changes,
therefore it also has no effect.

Paul A. Yachnes, MLS
Senior Manager
Information Resource Center
Newspaper Association of America
(703) 902-1694
fax: (703) 902-1691

-----Original Message-----
From: Stephen DeGabrielle []
Sent: Monday, December 19, 2005 10:45 AM
To: Yachnes, Paul;
Subject: Re: [greenstone-users] Linking to pdfs only

Hi Paul,

I am cc'ing this to the lsit as I am sometimes wrong - hopefully the
many who are more qualified will correct me if I have got it wrong.

On 12/17/05, Yachnes, Paul <> wrote:
> I assume you mean the collection configuration file 'collect.cfg'
YES - YOU ARE CORRECT I was refering to etc/collect.cfg in your

> the 'main.cfg' does not contain this statement. Well, changing this
> does not change the behavior I described, so perhaps I still don't
> understand what you are referring to.
SORRY - I was a bit terse;
The format statement is described on page 43 (51st page of the pdf) of
the developers guide

Try adding to the collect.cfg file
format DocumentText "This is where DocumentText appears for [dc.Title]

[save file/refreshbrowser - you may have to restart greenstone if you
are using the windows/local library version]

Open you collection in the browser - search for a document with no
text - click the link to the [nonexistant] text - you should see the
testmessage you included
(BTW there is no need to rebuild the collection when editng the format
statements - just save/refresh)

If you see the message then you have successsfully used format
You can then play with {If} to make the result conditional on the
presence of text.
I would suggest testing a metadata field {If}{{[Text],,} doesn't
work. [this would require you flagging the pdf files with no text
using a metadata field - pretty easily done either manually or by
modifying PDFPlug - this is assuming that PDFPlug/greenstone doesn't
already have an inbuilt resolution to this problem that I am not aware

Sorry I am being still being pretty terse - if you could give examples
of the start of the doc.xml files for pdfs with and without text I
could probably formulate a better example.

I hope this helps - email me and the list back with responses as most
people run into the same problems.



> -----Original Message-----
> From: Stephen DeGabrielle []
> Sent: Thursday, December 15, 2005 9:07 PM
> To: Yachnes, Paul;
> Subject: Re: [greenstone-users] Linking to pdfs only
> Its in your configuration file and starts
> format DocumentText '
> This line controls what you see when you click on the default links
> (the one that goes to the non-existant text versions in your case)
> It is described [briefly] in the developers guide round pages 30-40
> along with the outer format statements I think?
> I'd change it from
> format DocumentText ' [text]'
> to something like
> format DocumentText ' <a href= "[sourcefile]">PDF version</a>'
> Sorry I can't be more specific - I am in a hurry and don't have time
> to look it up myself. (Check the greenstone archives - someone has
> probably already had this problem)
> Good luck
> Stephen
> On 12/16/05, Yachnes, Paul <> wrote:
> > > 2) The document links in the Phind classifier link to the
> > > nonexistent text versions. How can I make them link to the pdf
> > versions?
> >
> > You could change the 'format DocumentText' to refer to the PDF using
> > {If} directive like above.
> >
> >
> >
> > I can't find that. Could you tell me where that is? And what would
> > statement look like? I can't figure out from all the code you sent
> > Thanks.
> >
> > Paul A. Yachnes, MLS
> > Senior Manager
> > Information Resource Center
> > Newspaper Association of America
> > (703) 902-1694
> > fax: (703) 902-1691
> >
> >
> >
> --
> --
> Stephen De Gabrielle



Stephen De Gabrielle