SQLite Forum

3.31.1: docs as PDF?
Login
> The only reason I like PDFs is because a related set of pages reside in a single file.

I put something like this together for the SQLite docs years ago.  You
can still try to build it from the [SQLite Documentation Sources][1] by
using "make docapp", though I found that the Makefile didn't quite work
and I had to finish the build manually.

If you successfully build "docapp", then you just run the application and
it automatically starts up a small web-server running on "localhost" and
hosting all of the SQLite documentation.  It also automatically launches
your default web-browser and points it to "http://localhost:8080/" (or
whatever alternative TCP port the web-server chose) so that you can browse
the complete SQLite documentation.

Note that all the documentation and the code to run the local web-server
and launch the web-browser are all packaged into a single executable file,
which is I believe what you are looking for, is it not?

## How Docapp Works

The base executable is "sqltclsh" - a version of "tclsh" that has the
"sqlite3" command built-in, along with a few other goodies.  You can build
"sqltclsh" from the standard SQLite makefile:  "make sqltclsh".

The documentation pages are put into an [SQLite Archive][2] that contains
all of the SQLite documentation file.  An SQLite Archive is just an SQLite
database.  This is appended to the "sqltclsh" executable and accessed
using the [Append VFS][3] extension.

The built-in web-server is just [Wapp][4].  The Wapp script to start up and
run the web-server and server files out of the appended SQLite Archive is
a mere [23 lines of code][5].

[1]: https://www.sqlite.org/docsrc/doc/trunk/README.md
[2]: https://www.sqlite.org/sqlar.html
[3]: https://www.sqlite.org/src/file/ext/misc/appendvfs.c
[4]: https://wapp.tcl.tk/home/doc/trunk/README.md
[5]: https://www.sqlite.org/docsrc/file/docapp/main.tcl