Query an Sqlite database from a troff document
- C 67.4%
- Roff 26.3%
- Makefile 6.3%
|
|
||
|---|---|---|
| demo | Rename the macro .sqlfile to .sqldb, since the database is not always a file. | |
| LICENSE | First commit. | |
| makefile | Use more conventional paths. | |
| README | Rename the macro .sqlfile to .sqldb, since the database is not always a file. | |
| tsql.c | Add .sqlso to source an sql file. | |
| tsql.man | Rename the macro .sqlfile to .sqldb, since the database is not always a file. | |
tsql - Executes sqlite statements from a troff document.
Presentation
------------
Tsql is a troff pre-processor which executes the SQLite statements
found in a troff file and format their results.
The file can then be processed by tbl (optionnaly) and troff.
Example
-------
echo ".sqldb :memory:
.sqlbeg
create table T (id integer primary key, value text);
insert into T (value) values ('alpha'), ('beta'), ('gamma');
select * from T;
.sqlend" | tsql
will return:
.tblrow
. tblcol 1
1
. tblcol 2
alpha
.tblrow
. tblcol 1
2
. tblcol 2
beta
.tblrow
. tblcol 1
3
. tblcol 2
gamma
Build
-----
To build and install tsql and its manual page, run :
make
make install
To uninstall and clean, run :
make uninstall
make clean
License
-------
Tsql and its man page are distributed under the ISC license.