Re: [greenstone-users] supercollection

From Katherine Don
DateThu, 23 Jun 2005 15:27:04 +1200
Subject Re: [greenstone-users] supercollection
In-Reply-To (A31D9C2D911C324A82164EE7931C1C1E99C5F0-icfrbous009-icare01-com)
Hi Charlotte

This is a known bug.
A workaround is to edit gsdl/perllib/plugins/ConvertToPlug.pm.

Near the start of the read method (sub read {)
after

if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
return undef;
}

add

if (not defined $self->{'coll_name'}) {
my ($coll_name) = $filename =~ /collect/(.*)/import/;
$self->{'coll_name'} = $coll_name;
}

Near the end of the file, replace

my $doclink = "<a
href="/gsdl/collect/gsarch/index/assoc/[archivedir]/doc.$doc_ext">";

with

my $collection = $self->{'coll_name'};
my $doclink = "<a
href="/gsdl/collect/$collection/index/assoc/[archivedir]/doc.$doc_ext">";

This means that the collection name is hard wired into the srclink. So
if you rename the collection it needs to be reimported and rebuilt.
Also it may not work for people that use -importdir option to import.pl.

But hopefully it will work for you.
You will need to reimport and rebuild the three test collections.

Regards,
Katherine Don

HODEBERT Charlotte wrote:
> Hi,
>
> I have a very big collect of invoices, so i want to do a collection per
> month.
> I begin a test with 3 collections : "col1" "col2" et "test".
> I insert the ligne in start of my "collect.cfg" for the "col1" :
> */supercollection col1 col2 test/*//
>
> I build correctly this colLection, i success to found in "col1" a
> document of the collection "col2" or "test", i have a link for this
> document with the good name of document, with the good index but not a
> valid link address!
>
> For example : i search the invoice number "00000859" , i found ___
> collection test client MANZINI SRL - MAI 05_ (620025) n□ : 00000859
>
>
> but the adress link is :
> http://..../collect/col1/index/assoc/HASH010c.dir/doc.pdf instead of
> http://..../collect/test/index/assoc/HASH010c.dir/doc.pdf
>
> Is there a parameter?
> I copied my "collect.cfg" in appendix.
>
>
> Thanks
>
>
> Charlotte
>
>
>
>
>
>
>
>
>
>
> -----------------------------my
> collect.cfg------------------------------------------------------------------------
>
> creator admin@icare-france.com
> maintainer admin@icare-france.com
> public false
>
> supercollection col1 col2 test
>
> indexes paragraphe:NumFact paragraphe:Client paragraphe:CodeCli
> defaultindex paragraphe:NumFact
>
>
> plugin GAPlug
> plugin PDFPlug -nolinks -no_metadata -no_images
> plugin ArcPlug
> plugin RecPlug -show_progress -use_metadata_files
>
>
> classify AZList -metadata Client -buttonname Clients
> classify DateList -nogroup -sort NumFact -bymonth
>
> collectionmeta collectionname [l=fr] "collection 1"
> collectionmeta iconcollection [l=fr]
> "/gsdl/images/icare/logo_icare.jpg"
> collectionmeta iconcollectionsmall [l=fr]
> "/gsdl/collect/factures/images/logo.jpg"
> collectionmeta .paragraphe:NumFact [l=fr] "num&#233ros de facture"
> collectionmeta .paragraphe:Client [l=fr] "noms de Client"
> collectionmeta .paragraphe:CodeCli [l=fr] "codes client"
>
>
> format DateList "<td valign=top>[link][srcicon][/link]</td>
> <td valign=top>[srclink]<b>[Title]</b>[/srclink]</td>
> <td width="25%" nowrap>N&deg : [NumFact]</td>"
>
> format VList "<td>
> [srclink][srcicon][/srclink]
> </td>
> <td width="80%" nowrap>
> [srclink][Title][/srclink] ([CodeCli])
> </td>
> <td width="10%" nowrap>
> n&deg : [NumFact]
> </td>
> </td>
> <td width=20></td>
> <td nowrap>
> <h3>[Periode]</h3>
> </td>
> "
>
> format HList
> "[link][highlight]{Or}{[dls.Title],[dc.Title],[ex.Title],Untitled}[/highlight][/link]"
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users