sqliteconvert: extract SQLite documentation

INTRODUCTION
sqliteconvert is a set of tools to extract documentation from SQLite database schemas.

Documentation, in this regard, consists of the schema itself and comments prior to each table and comment. What you're reading right now is part of the comment above the table called “INTRODUCTION”. The result of this extraction is this HTML5 page. It consists of an image showing the schema, the documentation, and an image map linking the two. All of these are contained on this page: clickable image-map on the left, target documentation on the right. Click and find out!
1. Tools
The tools generating this page are sqliteconvert(1), sqlite2dot(1), and sqlite2html(1). The first, sqliteconvert(1), is simply a shell script that pulls together the latter two.
2. Input
The file generating this text is test.sql.html. You can see how I generate the links (Markdown-style) from the comments.
3. Source Code
To see the source code, head to github.com/kristapsdz/sqliteconvert and check it out yourself. It consists of the (minimal) SQLite parser and its output modes.
4. Larger Example
To see a larger example, visit schema.html. This is created from the Gamelab schema by using the default sqliteconvert(1) invocation.
Lorem
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
col1
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem.
col2
Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
col3
Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima.
col4
Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
id
And lastly, here's the primary key.
SYNTAX
In this “table”, I show how to document your SQLite schema so that it shows up nicely—just like this here. You can read about it in detail in sqlite2html(1).

On the other hand, you can just infer all this from test.sql.html.
1. Comments
The comments themselves can be in SQLite single-line format (two dashes), multi-line (slash-asterisk until another slash-asterisk), or fancy multi-line (slash-asterisk until another slash-asterisk, but ignoring “*” at the start of individual lines).
2. Schema
sqliteconvert recognises “CREATE TABLE” statements and the columns described by that, including foreign key references and unique constraints. At this time, the unique constraints are not used in any way.
3. Specials
Beyond the schema itself and the comments, you can have generic links and link to tables/columns. Quotes and dashes are also nice-ified.