This package is a collection of simple utilities and libraries for processing BiBTeX files. It allows generating documents or parts of documents automatically from a BiBTeX database and performing some simple maintenance tasks (such as sorting entries or merging files) on those databases. The libraries include a Prolog parser for references in BiBTeX format.
The general idea is that .bib
files are converted to .pl
files using bib2pl
and then the .pl
(Prolog) files are used to generate several listings, reports, etc. automatically, by writing simple Prolog scripts. A number of sample scripts are provided. Some library files are also available with some predicates which may facilitate writing other, similar scripts.
In order for the bibutils
package to work optimally, .bib
files must adhere to some conventions, which are specified in section Conventions for BiBTeX files.
In general, automatically generated files produced by the scripts include _auto
in the name in order to identify them as such.
As mentioned above, these utilities have been written as
Prolog scripts. Such scripts are supported directly by certain Prolog systems (such as CIAO Prolog
) and can be implemented easily on other Prolog systems (e.g., a prolog_shell
package is available for SICStus Prolog
from http://www.clip.dia.fi.upm.es/Software).
Because these are Prolog scripts, no actual installation is needed after unpackaging the distribution. However:
/usr/local/bin
) or including the distribution directory in your
path for executables (e.g., PATH
).
ciao-shell
or prolog_shell
) must also be accessible for execution, i.e., it must be in your execution path. Alternatively, you can edit the header of the scripts and put absolute file paths.
You may be also be able to run the code of the scripts from the top level of other Prolog systems by commenting out the headers and loading it into the Prolog system in the standard way.
The package
documentation is included in the doc
directory in several formats. You may want to copy it to more accessible places (this can be done by typing gmake install
).
bib2pl f1.bib f2.bib ...
.pl
file (file generated is f1_f2_.._auto.pl
).
Caveats/Bugs:
@string
is not supported yet.
mergesortbibs f1.bib f2.bib ...
.bib
. file (file generated is f1_f2_.._auto.bib
).
Caveats/Bugs: same as above.
pl2bib bibfile.pl
.pl
file (containing a paper database) into a .bib
file.
pl2pubsbyyear SName PName bibfile.pl people_urls.pl paperdir paperdirurl
bibfile.pl
in which SName
is an author (if -
is used then all papers in bibfile.pl
are selected). The list is produced in latex (in English), classified by publication type and YEAR of publication.
PName
is a (normally longer) name of SName
, which will be used to produce the section titles.
people_urls.pl
must contain a predicate url_db(Name,URL,email)
(all arguments are strings) and is used to obtain
urls for authors, etc. For example:
url_db(""M.Hermenegildo"", ""http://www.clip.dia.fi.upm.es/~herme"", ""herme@fi.upm.es"").
paperdir
is a directory (which should be accessible via WWW) where PDF (.pdf
)
or postscript (.ps
/ .ps.gz
)
versions of the papers are stored. These .pdf
(or .ps
/ .ps.gz
) files must be named keyword.pdf (or keyword.ps / keyword.ps.gz), where keyword is the keyword field in the bib entry.
paperdirurl
is the url address of that directory.
examples/clippubsbyyear
.)
pl2pubsbytopic SName PName bibfile.pl people_urls.pl topics.pl paperdir paperdirurl
bibfile.pl
in which SName
is an author (if -
is used then all papers bibfile.pl
are selected). The list is produced in latex (in English), classified by publication type and TOPIC of the paper.
PName
, people_urls.pl
, paperdir
, and paperdirurl
are as above.
topics.pl
, the
topics database, must contain a predicate topic(TopicKeyword,TopicText)
(first argument is an atom, the second a string) which relates topic keywords with some text describing the topic. The former is what is included in the entries in bibfile.bib
database, in the butopics
field. The latter is the text used in section headings in the generated document. For example:
topic(anal,""Program Analysis"").
examples/clippubsbytopic
. Note for CLIP group: the CLIP topics database is in /home/clip/PlDbs/clip_topics.pl
.)
pl2pubsbytopiclist SName PName bibfile.pl people_urls.pl topics.pl paperdir paperdirurl lang topicid1 ... topicidn
pl2pubsbytopic
, but a number of topics can be given and a single list is produced, merging the papers in all those topics. This version also allows specifying the output language (currently: eng
or esp
). This one is useful for generating lists of publications in a given set of topics (e.g., for proposals).
pl2pubsbyproject SName PName bibfile.pl people_urls.pl paperdir paperdirurl
bibfile.pl
in which SName
is an author (if -
is used then all papers bibfile.pl
are selected). The list is produced in latex (in English), classified by publication type and PROJECT of the paper.
PName
, people_urls.pl
, paperdir
, and paperdirurl
are as above.
examples/clippubsbyproject
.
pl2engcur bibfile.pl Name people_urls.pl paperdir paperdirurl
Name
, in latex (English), classified by type of publication. people_urls.pl
is as above.
(An example application is examples/engcur
.)
pl2coll bibfile.pl Name SinceYear
Name
, since SinceYear
, in latex (English), classified by type of collaboration (publication).
pl2tramoscur bibfile.pl Name people_urls.pl paperdir paperdirurl
Name
, in latex (Spanish), classified by type of publication. people_urls.pl
is as above.
(An example application is examples/tramoscur
.)
incversion file
examples/clippubsbyyear
.)
These utilities are more specific to the CLIP group's environment, but (parts of them) may be useful to other people or may serve as a starting point for developing other, similar scripts:
pl2cicytcur bibfile.pl Name
Name
.
(An example application is examples/cicytcur
.)
pl2upmcurbooks bibfile.pl Name
Name
.
(An example application is examples/upmcur
.)
pl2upmcurpub bibfile.pl Name
Name
.
(An example application is examples/upmcur
.)
pl2clip_dia_annual bibfile.pl year
year
.
pl2gispubs bibfile.pl year month
These libraries include predicates which are used by several of the scripts. They may also be useful for writing other, related scripts:
support.pl
bibparser.pl
pp_papers_bib.pl
pp_papers_latex.pl
pp_papers_pl.pl
The directory examples
contains directories or links to directories with
example applications.
Go to the first, previous, next, last section, table of contents.