SQLite Forum

Support for Markdown formatted table output from a query
A possible alternative for table output:  The .once and .output commands get a -h option, similar in operation to the -x or -e options, except output is to an HTML file which, after the output completes, is opened by whatever application is designated to open .html files.

I did this with very few changes to the shell, other than to add stuff before and after the present html mode output that makes a pretty table display. (A 1 pixel border really improves it, to my taste.)

The motivation was to see if, for modern systems, there might be a simple alternative to fixed-width output that worked better than fiddling with .width. To my pleasant surprise, the two browsers I used, given no guidance on how wide the columns need to be, display quite nicely, with multi-line, wider columns where there is an absurd amount of text and narrower columns where the values fit. In fact, it looked better than dumping TSV into a spreadsheet.