Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "bibtex"

Title:Parser and predicates for BibTeX files
Rating:Not rated. Create the first rating!
Latest version:0.1.8
SHA1 sum:92fe0a9d52de0aa612caaeaa088a7bc1f0e9a823
Author:Christian Gimenez <christian.gimenez@fi.uncoma.edu.ar>
Home page:https://bitbucket.org/cnngimenez/swi-bibtex/
Download URL:https://bitbucket.org/cnngimenez/swi-bibtex/get/bibtex-*.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.1.892fe0a9d52de0aa612caaeaa088a7bc1f0e9a82323https://bitbucket.org/cnngimenez/swi-bibtex/get/bibtex-0.1.8.zip
0.1.7fcc7c120f7206313722798ff5e5c79bab29432202https://bitbucket.org/cnngimenez/swi-bibtex/get/bibtex-0.1.7.zip
0.1.6918113d0f9b1354a9445704aebfabc9c93adc5457https://bitbucket.org/cnngimenez/swi-bibtex/get/bibtex-0.1.6.zip
0.1.442aa92c67573b1b2998ed426b8e5929ed6a3973e1https://bitbucket.org/cnngimenez/swi-bibtex/get/bibtex-0.1.4.zip

BibTeX Package for SWI-Prolog

This package implements predicates and DCG rules for parsing BibTeX files.

Usage

This section explain how to use this package.

For more information, use doc_browser/0 and, in the Web browser, choose "List extension packs".

Commands

There are commands implemented for printing BibTeX information to the current output.

In the SWI console, load the library and the BibTeX file with these commands:

use_module(library(bibtex_cmd)).
bibtex_use('~/some-bibtex.bib').

List all entries using bibtex_list/0:

bibtex_list.

Search for an author and print results:

bibtex_search_author("Halpin").

Print the N-th entry:

bibtex_search_nth(2).

API

Parse an entire BibTeX file.

use_module(library(bibtex)).
bibtex_file('~/file.bib', LstEntries).

Get the 20-th entry.

nth_bibtex_file('~/file.bib', 20, Entry).

Search for author's entries.

bibtex_author('~/file.bib', "Surname", LstEntries).

Testing

This package does not need to be installed.

Enter into the `./tests/` directory, run the swipl interpreter and execute:

use_module(bibtex_tests).
run_tests.

License

!GPLv3

See COPYING.txt file or the GNU GPL Licence page.

Contents of pack "bibtex"

Pack contains 18 files holding a total of 95.4K bytes.