_iconlyrics_
_icondisc_
_icontab_
_iconmarc_
_iconmidi_
_iconmp3_
Compare this format statement with the equivalent documentNode template in the manually-created collectionConfig.xml for the same collection in the Greenstone 3 Multimedia tutorial:
There are two significant differences between the two.
1. First, the automatically generated format statements refer to macros like ''_icondisc_'', ''_icontab_'', whereas the hand-written format statements make mention of icons using the form ''
do something 1
do something 2
...
The hand-written version looks like:
do something 1
do something 2
...
===== Using a remote Greenstone server =====
The new Format Conversion Wizard only appears when you're working with GLI, not client-GLI. The client-GLI for GS3 will only perform the most basic initial step in the conversion process, which is to preserve the GS2 format statements in inactive XML tags in the new collection's collectionConfig.xml.
However, if you have a local Greenstone 3 installed, you can still manage to convert a remote collection's collect.cfg file to its GS3 equivalent.
- Open the GS2 collection on the remote GS3 server with client-GLI. Doing so for the first time will perform the preliminary conversion step of the GS2 collect.cfg into collectionConfig.xml.
- Download the remote collection's ''etc/collectionConfig.xml'' file. If you open a remote collection, it is likely to download a zipped up a copy of the collection's etc folder and its contents into your client machine's .gli folder in the user area.
- Open regular GLI of a GS3 installation on the client machine. Create a new empty collection. Quit GLI.
- Go to the local GS3 installation's ''web/site/localsite/collection/
RewriteEngine On
# a test rule to make sure rewriting is working at all - visit localhost:8282/test
RewriteRule ^/test$ http://example.com/ [R=302,L]
# redirect to Greenstone 3
# Match library.cgi requests
RewriteCond %{REQUEST_URI} ^/greenstone/cgi-bin/library\.cgi$ [NC]
#only a=d versions
RewriteCond %{QUERY_STRING} a=d [NC]
# Extract collection (c=...) and document (d=...) from query string
RewriteCond %{QUERY_STRING} ^.*c=([^&]+).*[&]d=([^&]+).*$ [NC]
# the captured groups will be %1 and %2
RewriteRule ^/greenstone/cgi-bin/library\.cgi$ https://localhost:8383/greenstone3/library/collection/%1/document/%2? [R=301,L]
# optional, if things aren't working, you can log some output to see if matching is happening
RewriteLog "/tmp/rewrite.log"
RewriteLogLevel 5
Notes:
* older versions of Greenstone 2 used gsdl instead of greenstone in URLS, so modify these lines accordingly.
* If this apache is not on the same server as the running Greenstone 3, then change localhost:8383 to the public URL of the gs3 library.
==== Part 2: Get matching doc ids ====
If you are using HASH ids, then these can change between greenstone versions. Tip - if you want external links into your library, use an OID type that won't change. eg hash_on_full_filename, assigned, filename, dirname, full_filename.
If the Greenstone 2 used hash ids, when you rebuild in greenstone 3, then hash ids will change. and then the redirects won't work.
Some options to try:
=== Don't rebuild ===
Copy the collection over to greenstone3, open it in GLI to convert the config files - format statements may need tweaking - then see if it works in the library without rebuilding. The HASH ids won't have changed, but whether the collection works properly will depend on the gap between versions. A downside to this way is that you can never rebuild the collection.
=== Use archives as import ===
If you have the archives folder available in the greenstone 2 collection, you could use this as the import for the greenstone 3 collection.
Set up the collection so that it looks right in Greenstone 3 - either by starting from scratch, or by copying over the old collection as above.
Copy all the HASHxx folders from the greenstone 2 collection's archives folder into the greenstone3 collection's import folder. You don't want archiveinf-* files, rss.items, earliestDatestamp files.
Then do a full rebuild.
=== Extract ids and add as metadata ===
If you no longer have the archives folder in the Greenstone 2 collection, then your task is a bit more complicated.
What might work is:
1. run db2txt.pl over the gdbm metadata database in the greenstone 2 collection and save to a file, eg: db2txt collect/demo/index/text/demo.gdb > db.out (If the Db is .jdb use jdb2txt.pl instead)
2. Write a script to extract filenames and identifiers from the output. Probably into a CSV file would be easiest:
Filename,prev.Identifier
sample.pdf,HASH01e86960c45a06eaa801e869
3. Put the source documents into the Greenstone 3 collection, add the csv file. Add CSVPlugin to process the csv file. Then use -OIDtype assigned, and -OIDmetadata prev.Identifier import options to get it to use these identifiers as the new doc ids.
This relies on no subfolders in import.