Dear Miguel,

Il mercoledì 21 gennaio 2009 09:59:46 Samuele Kaplun ha scritto:
> I think I can prepare a patch directly for Invenio 0.99.1 for the unAPI
> handler plus MODS export which are necessary to support Zotero.

Ok, so here's the patch. Let me know in case you encounter any error in 
applying it.

* unpack the package
$> cd /tmp
$> tar xvzf {path where you saved the package}/zotero-integration-patch.tar.gz

* You should first apply zotero.patch in /opt/cds-invenio/lib/python/invenio:
$> cd /opt/cds-invenio/lib/python/invenio
$> ## make a backup of: websearch_templates.py, websearch_webinterface.py, 
webinterface_layout.py, webstyle_templates.py files.
$> patch --dry-run -p0 < /tmp/zotero/zotero.patch
$> ## if no error appears then
$> sudo patch -p0 < /tmp/zotero.patch

(execute sudo with the correct user who owns your Invenio installation, 
usually root)


* Save the attached MODS.xsl 
into /opt/cds-invenio/etc/bibformat/format_templates/
$> sudo -u apache 
cp /tmp/zotero/MODS.xsl /opt/cds-invenio/etc/bibformat/format_templates

(execute sudo with the correct user who owns your Invenio installation config 
files, usually www-data or apache)

* Save the attached MODS.bfo 
into /opt/cds-invenio/etc/bibformat/output_formats/
$> sudo -u apache 
cp /tmp/zotero/MODS.bfo /opt/cds-invenio/etc/bibformat/output_formats/

* execute:
$> echo "INSERT INTO format(name,code,description,content_type,visibility) 
VALUES ('MODS', 'mods', 'Metadata Object Description 
Schema', 'application/xml', 1)" | /opt/cds-invenio/bin/dbexec

* In your Apache configuration, in the rows (both for port 80 and for 443) 
where mod_python specific paths are specified (e.g.:
<LocationMatch 
"^(/+$|/cgi-bin/setlink|/index|/collection|/record|/author|/search|/browse|/youraccount|/youralerts|/yourbaskets|/yourmessages|/yourgroups|/submit|/getfile|/comments|/error|/oai2d|/rss|/help|/journal|/openurl|/stats)">)
at the end add |/unAPI as in:
<LocationMatch 
"^(/+$|/cgi-bin/setlink|/index|/collection|/record|/author|/search|/browse|/youraccount|/youralerts|/yourbaskets|/yourmessages|/yourgroups|/submit|/getfile|/comments|/error|/oai2d|/rss|/help|/journal|/openurl|/stats|/unAPI)">)

* restart Apache.

* Enjoy Zotero on Firefox! :-)

You can check if everything went fine by visiting e.g. 
<http://doc.rero.ch/unAPI>
and see if looking at the sources of the page you got an XML answer with a 
line corresponding to "mods" export format.

Best regards,
        Samuele


-- 
.O.
..O
OOO

Attachment: zotero-intergration-patch.tar.gz
Description: application/tgz

Reply via email to