Preview HTML

June 8, 2026 ยท View on GitHub

preview_html.py generates a local preview of the HIT by substituting one row from the _publish_batch.csv into the generated .html template.

Non-public asset URLs (.js, .css) are replaced with publicly accessible CDN equivalents so the preview works without downloading external resources.

Usage

cd src
python utils/preview_html.py --dir YOUR_PROJECT_NAME --samples 1
ArgumentRequiredDefaultDescription
--dirYesโ€”Directory containing the .html, _publish_batch.csv, and .cfg files produced by master_script.py.
--samplesNo1Number of CSV rows to generate preview files for.

The output is saved in the same directory as <original_name>_row-1.html.

Automatic generation

Pass --create_local_test to master_script.py to automatically generate one preview file after the project is created:

python master_script.py ^
	--project YOUR_PROJECT_NAME ^
	--method acr ^
	--cfg your_configuration_file.cfg ^
	--clips rating_clips.csv ^
	--training_clips training_clips.csv ^
	--gold_clips gold_clips.csv ^
	--trapping_clips trapping_clips.csv ^
	--check_urls ^
	--create_local_test