Bibliographic database with LDAP.

mkondrin at hppi.troitsk.ru

29 ÓÅÎÔÑÂÒÑ 2007 Ç.
This package is an update of long unmantained software by Pierangelo Masarati ldap2bibtex. The purpose of the package is to store bibliographic entries in hierarchical LDAP database, share them through the net among the groups of coworkers and make the bibliographic data be easily available to end-users in popular bibtex format which can be directly inserted into latex publication or converted into other bibliographic formats. The Pierangelo Masarati’s home page gives enough information to start using this package because the end-user options of utilities included into package are almost still the same.

But still there are some differences between the old and new versions. The newer version provides:

What does ldap2bibtex do?

The package consists of schema file and two console utilities - ldap2bibtex and bibtex2ldif. The first one connects to LDAP servers and downloads entries from server in bibtex format. The typical usage:

./ldap2bibtex -b"ou=Bib,o=MyOrg" -M gssapi -h ldap.server.fqdn -F "(bibtexEntryTag=pw*)" | iconv -f UTF8 > found.bib

(here the subtree "ou=Bib,o=MyOrg"is searched for the entries matching filter -F and the result sent through iconv utility into bibtex file)

If you have an aux file obtained from the first run of latex on texsource.tex file then the citations present there can be downloaded from the LDAP server to on-disk file at once with the command:

./Ldap2bibtex -b"ou=Bib,o=MyOrg" -M gssapi -h ldap.server.fqdn -a texsource.aux  | iconv -f UTF8 > texsource.bib

The second utility is to convert existing bib entries into ldif format. It does not transfer them to LDAP server bau this can be easily done with the command pipe:

./bibtex2ldif -b"ou=Bib,o=MyOrg" -i texsource.bib  | iconv -f UTF8 | ldapadd -c -Y gssapi -h ldap.server.fqdn

The schema structure looks like the one shown on the picture below. The idea is to put different bib entries into the classes of their own and each field in bib.entry into separate attribute.


PIC

òÉÓ. 1: Part of Ldap2Bibtex schema


To make this scheam available to the OpenLDAP server you have to put file etc/ldap2bibtex.v3.schema into directory where openLdap schemas are stored (e.g. /etc/openldap/schema) and restart the server. I use the following configuration file slapd.conf:

include         /etc/openldap/schema/core.schema  
include         /etc/openldap/schema/cosine.schema  
include         /etc/openldap/schema/ldap2bibtex.v3.schema  
 
pidfile         /var/run/slapd.pid  
argsfile        /var/run/slapd.args  
 
authz-regexp  
         uid=([^,]*),cn=gssapi,cn=auth  
        cn=$1,ou=People,o=MyOrg  
 
database        bdb  
suffix          "o=MyOrg"  
rootdn          "cn=root,ou=People,o=MyOrg"  
 
access to dn.subtree="ou=Bib,o=MyOrg"  
        by users write  
        by users read  
 
directory       /var/lib/ldap  
 
index   objectClass     pres,eq  
 
index   bibtexAuthor    approx,sub  
index   bibtexTitle     approx,sub  
index   bibtexKeywords  pres,approx,sub,eq  
index   bibtexYear      eq  
index   bibtexEntryTag  eq,sub

Here you may want to soften restriction on the database and let other trusted people add entries to database and let even to unauthenticated users view the database.

The screenshot below give you an expression how it looks like in action. There is gq-client with a view of bibliographic subtree and emacs in reftex mode with a view of the same tree imported into bibtex file.


PIC

òÉÓ. 2: ldap2bibtex in action. GQ-client and emacs in reftexmode.


Download

Version 3.0.4 (fixes for bison-2.3)