Hi Samuele,
We've finally activated Zotero in RERO DOC.
The process you described was rather straightforward, although we had
to "patch" the process itself due to the local changes we've made in
the templates (namely websearch_templates.py and
webstyle_templates.py). For that we had to analyze the patch in detail
and check for each modification if it had to be reported to the
customized version of the templates. But that was ok.
In fact, what took us an unexpected amount of work was the XSLT: the
Library of Congress-provided template does not fit our usage of MARC
in several ways, and on the other hand Zotero has a rather unusual way
of interpreting certain aspects of MODS. After several adjustments of
MODS.xsl (and a peek at Zotero's sources) we finally came up with a
satisfactory MODS export format.
Thanks again for the patch. If someone would like to take a look at it
check: http://doc.rero.ch/
Don't hesitate to contact me in case you have any question concerning
this MARC/MODS/Zotero chain, I may perhaps be helpful, especially
while these things are still fresh on my mind.
Best regards,
Miguel.
On Jan 21, 2009, at 14:44, Samuele Kaplun wrote:
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
<zotero-intergration-patch.tar.gz>