Documentation
¶
Overview ¶
Command gofast extracts documents of every format the go-fast libraries read (PDF; Word, Excel, PowerPoint and Visio; OpenDocument; RTF; email; HTML, Markdown, text, EPUB, CSV, TSV and Jupyter notebooks) into their shared document model and prints them as JSON, Markdown or plain text. It opens zip, tar and gzip archives, and reads many files in parallel.
gofast [flags] file-or-directory...
A directory stands for the files in it and below it whose extension is one of those formats or an archive's (.zip, .tar, .tgz, .gz). A file named on the command line is read whatever its name, its format decided from its bytes. "-" is standard input.
Each file of an archive is a document of its own, named by the archive and its path inside it ("data.zip/reports/q3.pdf"); archives inside archives are opened too, down to -max-depth. Embedded documents (a PDF attached to a message, a workbook in a presentation, a zip attached to a message) are read by whichever library reads their format, and come with the document that holds them.
With one input that is not an archive the JSON is indented; otherwise each document is one line (JSON Lines), in the order of the inputs and of the members in each archive, whatever order the workers finish in. -dir writes each document to a file of its own instead, in a tree that mirrors the inputs. Only documents go to standard output: everything said about them goes to standard error, and the exit status is 1 if any input or member could not be read.