Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emaadmanzoor/bib2sqlite
Programming languages and compilers course project. Compiles a BibTex file into a sqlite3 database binary.
https://github.com/emaadmanzoor/bib2sqlite
Last synced: about 1 month ago
JSON representation
Programming languages and compilers course project. Compiles a BibTex file into a sqlite3 database binary.
- Host: GitHub
- URL: https://github.com/emaadmanzoor/bib2sqlite
- Owner: emaadmanzoor
- Created: 2013-10-25T16:14:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-25T16:14:38.000Z (about 11 years ago)
- Last Synced: 2024-04-16T01:44:30.577Z (8 months ago)
- Language: C
- Size: 1.29 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
**************************************
A Rudimentary Bibtex Query Processor
**************************************Author: Emaad Ahmed Manzoor (2008A7PS068G)
Quick Start
=============$ make compiler
$ ./compiler EMOO.bib
$ make query
$ ./query "select * from bibtab;"Generated Files
=================Intermediate File: out.sql
Generated Database: bibtex.db
Table Of Bibtex Entries: bibtab
Supported Queries
===================The query processor is sqlite3, so
all sqlite3 queries are supported.
Limitations
=============- TeX macros of the form \ are
retained, but all internal single
quotes are stripped out, including
the ones of the form \'.
- All braces are stripped out.
- Valgrind reports:
*definitely lost: 582,790 bytes*
This is when run on EMOO.bib, all
from "compiler.l", at the line:
318: yylval.str = strdup(yytext);
I'm not happy with this, I did spend
hours cleaning up my pointers, but
I hope it's enough for now, to get
by in a relative grading scenario.
Credits
==========Query processer taken from the sqlite3
amalgamated source tarball.
sqlite3 C wrapper from sqlite3.org."bibtab" Columns
==================bibtype TEXT, label TEXT, author TEXT,
editor TEXT, booktitle TEXT, title TEXT,
crossref TEXT, chapter TEXT, journal TEXT,
volume TEXT, type TEXT, number TEXT,
institution TEXT, organization TEXT, publisher TEXT,
school TEXT, address TEXT, edition TEXT,
pages TEXT, day TEXT, month TEXT,
year TEXT, CODEN TEXT, DOI TEXT,
ISBN TEXT, ISBN13 TEXT, ISSN TEXT,
LCCN TEXT, MRclass TEXT, MRnumber TEXT,
MRreviewer TEXT, bibdate TEXT, bibsource TEXT,
note TEXT, series TEXT, URL TEXT,
abstract TEXT, keywords TEXT, remark TEXT,
subject TEXT, TOC TEXT, ZMnumber TEXT
Flowchart
=============+-------------------+
$ make compiler --> | compiler (binary) |
+-------------------++---------+
$ ./compiler EMOO.bib --> | out.sql |
+---------+
+------------------+ +-----------+
$ make query --> | sqlite3 (binary) | --> | bibtex.db |
+------------------+ +-----------+
| ^
+----+ |
| |
| +------------+ ....................
| | query.c | : cat out.sql :
| +------------+ :..................:
| |
| |
| v
| +------------+ +------------------+
+> | sqlite3.o | --> | query (binary) |
+------------+ +------------------+
+----------------+ +---------------+
$ ./query "select * from bibtab" --> | query (binary) | --> | Query Results |
+----------------+ +---------------+
^
|
|
+----------------+
| bibtex.db |
+----------------+