Overview - Something like BibTeX, but written in perl and designed to be extensible in three dimensions: bibliographic databases |
PBib::PBib - Something like BibTeX, but written in perl and designed to be extensible in three dimensions: bibliographic databases (e.g. BibTeX, OpenOffice), document file formats (e.g. Word, RTF, OpenOffice), styles (e.g. ACM, IEEE)
use PBib::PBib; use Biblio::Biblio; my $bib = new Biblio::Biblio(); my $pbib = new PBib::PBib('refs' => $bib->queryPapers()); $pbib->convertFile($file);
I wrote PBib to have something like BibTex for MS Word that can use a various sources for bibliographic references, not just BibTex files, but also database systems. Especially, I wanted to use the StarOffice bibliographic database.
Now, PBib can be extended in a couple of dimensions:
Once you've installed the distribution you have to set up a bibliography database in order to start using PBib and PBibTk.
Several formats are supported:
I'd recommend to use a mysql database, this works fine for me. See the config/sample user.pbib file for some examples.
You should specify your default settings in a user.pbib file, which is searched for at a couple of places, e.g. you home directory. (Check that the HOME environment variable on windows is set.) In case you want to provide defaults for your organization, use the local.pbib file.
You can adapt the mapping of PBib fields to DB fields, see file config/OOo-table.pbib for an example if you want to use a OpenOffice.org bibliography database.
No support is given to edit the bibliography database, as there are lots of tools around. Check docs/Edit_Bibliography.sxw for a OpenOffice.org document to edit a bibliography database. (That's the form that I use.) Ensure that it's attached to the correct database (Tools>>Data Sources, Edit>>Exchange Database).
The CiteKey is the key defined in the bibliography database.
See the PBib::Intro manpage for a more detailed description. You can find sample files in the test folder t.
Not yet supported:
For now, this is treated as plain text.
At minimum, the correct character encoding should be ensured and some formatting for the References section.
Provided scripts as front ends for the modules:
bin/pbib.pl <<filename>>
Process an input document and write the converted output.
bin/PBibTk.pl [<<optional filename>>]
Open a Tk GUI that allows you to browse you bibliography database and browse the items referenced in your document.
You can use a filename.pbib config file to specify specific configuration for a file.
You can configure PBib in a number of ways, e.g. using config files and environment variables. For detailed information, please refer to module the PBib::Config manpage.
$APPDATA points on Windows XP to something like ``C:\Documents and Settings\<<user>>\Application Data''.
ToDo: Explain format of config files ..., look at the PBib::Config manpage and the exsamples provided with this distribution.
PBib itself consists of three packages that can be used independently:
the Biblio::File manpage uses the Biblio::BP manpage and the Biblio::Util manpage that encapsulate the ``bp'' package mentioned above.
PBib uses the format for references returned by Biblio, so it's well designed to be used together. But, PBib can be used with any hash of references that contains the same keys.
The main class is the PBib::PBib manpage. The main script is pbib.pl.
The main class is the PBibTk::Main manpage. It is started with the script PBibTk.pl.
I've thought about deploying these as separate packages, but currently I believe that this way it's easier to install and use.
This module requires these other modules and libraries:
In fact, bp is really helpful to generate the hashes with literature references from various sources. Please check http://www.ecst.csuchico.edu/~jacobsd/bib/bp/ and the bp README located in lib/Biblio/bp/README.
These methods are exported.
convertFile()
& optionally opens result in editor.
If $outfile (filename) is undef, outDoc (document) is used.
If $config or $refs is undef, the default values are used (the ones passed to the constructor).
The converter $conv is passed to the caller.
scanFile()
Peter Tandler <pbib@tandlers.de>
Copyright (C) 2002-2004 P. Tandler
For copyright information please refer to the LICENSE file included in this distribution.
bin\pbib.pl, bin\PBibTk.pl
Overview - Something like BibTeX, but written in perl and designed to be extensible in three dimensions: bibliographic databases |