[greenstone-users] Re: [Greenstone3] Automatically add a document to collection

From Oran Fry
DateWed, 06 Jun 2007 11:59:32 +1200
Subject [greenstone-users] Re: [Greenstone3] Automatically add a document to collection
Hi Kithsiri,

I have answered your questions below.

Kind Regards,
Oran.


Anton Kithsiri wrote:
Hi All,
I just need to automate (without gli) the process of adding a document to existing collection say xxx€ How can I add a document to exixting collection using commandline ( or other ways of automate this).

cd greenstone3

gs3-setup

cd gs2build

setup

cd ..

perl -S import.pl -collectdir %GSDL3HOME%siteslocalsitecollect testcol

perl -S buildcol.pl -collectdir %GSDL3HOME%siteslocalsitecollect testcol

rename the %GSDL3HOME%siteslocalsitecollect estcolbuilding directory

to ind€€ how can I do that as a folder call index already exit?

You can simply delete the original 'index' directory before renaming 'building' to 'index'.

and I have only the latest file in download folder and I think there is no need of building already added files?

You can add documents incrementally, but only if you are using the lucene indexer. Use the '-incremental' switch:
import.pl -incremental collname
buildcol.pl -incremental -builddir <path-to-index-dir> collname

For more information, check out
http://wiki.greenstone.org/wiki/index.php/Building_Greenstone_collections#How_do_I_build_my_collection_incrementally.3F

perl -S convert_coll_from_gs2.pl -collectdir

%GSDL3HOME%siteslocalsitecollect testcol

Is there another way?

Using these commands is certainly the best way to do what you want to do. To achieve true automation you might want to put the commands into a script and having it run periodically from the cron. That way you can simply drop files into your import directory whenever you want to , and the next time the script runs they will be live.

Thanks and Regards

/Kithsiri


_______________________________________________ Greenstone3 mailing list Greenstone3@list.scms.waikato.ac.nz https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone3


<<attachment>>
Type: message/rfc822
Filename: Re: [Greenstone3] Automatically add a document to collection

From: Oran Fry <oranfry@cs.waikato.ac.nz>
To: Anton Kithsiri <anton.perera@ifs.lk>
Subject: Re: [Greenstone3] Automatically add a document to collection
Date: Tue, 05 Jun 2007 10:01:54 +1200

Hi Kithsiri,

I have answered your questions below.

Kind Regards,
Oran.


Anton Kithsiri wrote:

Hi All,
I just need to automate (without gli) the process of adding a document to existing collection say xxx€ How can I add a document to exixting collection using commandline ( or other ways of automate this).

cd greenstone3

gs3-setup

cd gs2build

setup

cd ..

perl -S import.pl -collectdir %GSDL3HOME%siteslocalsitecollect testcol

perl -S buildcol.pl -collectdir %GSDL3HOME%siteslocalsitecollect testcol

rename the %GSDL3HOME%siteslocalsitecollect estcolbuilding directory

to ind€€ how can I do that as a folder call index already exit?

You can simply delete the original 'index' directory before renaming 'building' to 'index'.

and I have only the latest file in download folder and I think there is no need of building already added files?

You can add documents incrementally, but only if you are using the lucene indexer. Use the '-incremental' switch:
import.pl -incremental collname
buildcol.pl -incremental -builddir <path-to-index-dir> collname

For more information, check out
http://wiki.greenstone.org/wiki/index.php/Building_Greenstone_collections#How_do_I_build_my_collection_incrementally.3F

perl -S convert_coll_from_gs2.pl -collectdir

%GSDL3HOME%siteslocalsitecollect testcol

Is there another way?

Using these commands is certainly the best way to do what you want to do. To achieve true automation you might want to put the commands into a script and having it run periodically from the cron. That way you can simply drop files into your import directory whenever you want to , and the next time the script runs they will be live.

Thanks and Regards

/Kithsiri


_______________________________________________ Greenstone3 mailing list Greenstone3@list.scms.waikato.ac.nz https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone3