help bundle

Title

Bundle png images in a web page by encoding them using base64

Syntax

bundle using filename_in
[,
output(filename_out)]

Description

bundle reads an html file, finds all image tags linking to png files,
reads each file in turn, and attaches the image to the document by encoding
it in base 64 format using a data URI.

The name of the input file may omit the extension, which will
default to .html. This must be an existing file.

The name of the output file is optional. If omitted the command
will use the same name and extension as the input file appending
-b (for bundle) to the name. If the name is specified the
extension may be omitted and will default to .html.
If the file exists it will be overwritten.

The command lists each image file as it is processed.
If no image files are found no output is generated.

Examples

Bundle images in page.html and write page-b.html

. bundle using page

Read source.html and save with encoded images in bundled.html

. bundle using source, out(bundled)

Bundle images in links.htm and save self-contained page links2.htm

. bundle using links.htm, out(links2.htm)

Author

G. Rodríguez <grodri@princeton.edu>
data.princeton.edu/stata/bundle.