go get fossil
Help: test-search-stext

The "test-search-stext" command:

Usage: fossil test-search-stext TYPE RID NAME
Compute the search text for document TYPE-RID whose name is NAME.
The TYPE is one of "c", "d", "t", or "w". The RID is the document
ID. The NAME is used to figure out a mimetype to use for formatting
the raw document text.