Author: Charalampos Nikolaou Email : charnik@di.uoa.gr Date : Sun Jul 1, 2012 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BibTooL Project ------------------- Introduction ============ This project comprises a set of shell scripts for simple processing of bibtex files. The term `simple processing' can be understood as the level of processing needed to reach a clean/consistent/organized state of a bibtex "database". The challenging part of this project is that it fullfils its goal having as a basis the power and flexibility that a shell provides (see below for an exception to this rule). The ultimate goal of this project is to be portable to various platforms, such as Linux, Unix, SunOS, Mac OS X, Windows, etc. This is not the case right now, but it shall be while the project evolves. To reach this ultimate goal a set of tests should also be provided. Scripts are placed under the bin/ directory. By sourcing script `env.sh' you can place the bin/ directory in your PATH environmental variable and access bib scripts from any directory, as if you had installed them in your system. All scripts follow the same naming convention: bib_. An exception to this rule is the script for pretty printing of bib files, which is actually an executable binary. This execu- table, named `bibppprint', comes from `bibpprint.c' C program, and can be found under `src/btparse-0.35/progs/' directory. This program is a modified copy of `bibparse.c' C program which is provided by btparse library. Alternatively, the `bib' command is provided (placed under the bin/ directory) which is an interface to all bib commands provided by BibTooL. This command is more user-friendly since it contains help messages and usage information for commands. To encourage users of BibTooL project in using the `bib` interface, all scripts named as bib_ have no execu- tion permissions. Therefore, if one insists on calling them directly, she may do this by explicitly prepending a shell to the call, i.e., /bin/bash ${BibTooL}/bin/bib_ [ARG]... where `${BibTooL}' is the directory containing the bin/ directory of the BibTooL project. Building btparse-0.35 library ============================= If you are only interesting in using btparse library, then you have to go through the general process of configure and building the library as follows: In `src/btparse-0.35' directory run the following commands: ./configure make After executing `make', should you encounter erros such as libtool: Version mismatch error. This is libtool 2.2.6b Debian-2.2.6b-2ubuntu1, but the libtool: definition of this LT_INIT comes from libtool 2.2.10. libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6b Debian-2.2.6b-2ubuntu1 libtool: and run autoconf again. you should consider running command autoreconf --force --install and then re-execute the above two commands. Additionally, if you are interested in adding functionality, therefore modifying some Makefiles, then you have to build it using the following commands: ./bootstrap ./configure make Note that modifications to Makefiles should be done in `Makefile.am' files, because all others (i.e., `Makefile.in') are products of `Makefile.am' during the bootstrap process. Installing btparse-0.35 library =============================== After you have successfully compiled btparse-0.35, run the following command: make install This will place `bibparse' and `bibpprint' executables under the directory you specified during running configure (defaults to /usr). Using BibTooL ============= We demonstrate the capabilities of BibTooL by giving examples. * Fetching some bibtex entries from the DBLP server provided that we have their bibids (e.g., DBLP:books/sp/Grahne91 and DBLP:journals/jacm/ImielinskiL84). $ bib dblpget DBLP:books/sp/Grahne91 DBLP:journals/jacm/ImielinskiL84 @book{DBLP:books/sp/Grahne91, author = {G{\"o}sta Grahne}, title = {The Problem of Incomplete Information in Relational Databases}, publisher = {Springer}, series = {Lecture Notes in Computer Science}, volume = {554}, year = {1991}, isbn = {3-540-54919-6}, ee = {http://dx.doi.org/10.1007/3-540-54919-6}, bibsource = {DBLP, http://dblp.uni-trier.de} } @article{DBLP:journals/jacm/ImielinskiL84, author = {Tomasz Imielinski and Witold Lipski Jr.}, title = {Incomplete Information in Relational Databases}, journal = {J. ACM}, volume = {31}, number = {4}, year = {1984}, pages = {761-791}, ee = {http://doi.acm.org/10.1145/1634.1886}, bibsource = {DBLP, http://dblp.uni-trier.de} } * Finding duplicate bibids in the same file or across files and reporting the line of appearance. $ bib dups file1.bib # Freebase 1729:file1.bib 4589:file1.bib # Query_Cleaning 1588:file1.bib 4448:file1.bib ... ... Found 214 duplicate entries The above output reads as follows: There are 214 duplicate entries. One has as bibid value `Freebase' and can be found in file `file1.bib' at lines 1729 and 4589. $ bib dups file1.bib file2.bib # news_onto 234:file2.bib 2124:file1.bib 4984:file1.bib ... ... Found 214 duplicate entries The above output reads as follows: There are 214 duplicate entries in files `file1.bib' and `file2.bib'. One has as bibid value `new_ont' and can be found in file `file2.bib' at line 234 and in `file1.bib' at lines 2124 and 4589. Licence ======= Copyright (C) 2012-2018 Charalampos Nikolaou This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program in file `COPYING. If not, see . BUGS ==== Report bugs to: Charalampos Nikolaou