sqlite2dot
—
convert sqlite3 schema to GraphViz input
sqlite2dot |
[-v ] [-c
attrs] [-h
attrs] [-p
prefix] [-t
attrs] [schema] |
The sqlite2dot
utility converts an
sqlite3(1)
schema file to a GraphViz file readable by
dot(1). Its
arguments are as follows:
-v
- Emits informational messages to standard error.
-c
attrs
- Table-cell attributes. See the GraphViz documentation for HTML labels for
a list of cell attributes (except “href”). You should invoke
this once per attribute (they will accumulate).
-h
attrs
- First table-cell (header) attributes. If unset, this will use
-c
. See the GraphViz documentation for HTML labels
for a list of cell attributes (except “href”). You should
invoke this once per attribute (they will accumulate).
-p
prefix
- Prefix to use for creating HTML ID tags.
-t
attrs
- Table attributes. See the GraphViz documentation for HTML labels for a
list of cell attributes (except “href”). You should invoke
this once per attribute (they will accumulate).
- schema
- An SQLite schema file.
The outputted GraphViz file serialises tables as HTML-label nodes,
each of which has one row per table column. Table nodes are connected by
foreign keys.
sqlite2dot
is best when creating image
maps by piping into
dot(1)
with -T
cmapx then
-T
png or similar backing,
then using the usemap
attribute for the HTML
<img>
tag. You can then use
sqlite2html(1)
for linking to the documentation.
The schema language accepted by sqlite2dot
is currently
limited to the table declaration with a subset of the column specification.