C.2 | rivt Files#
[1] File Types#
rivt file
A rivt file provides the formatting instructions and content that generate rivt docs. Each rivt file has a doc number prefix that specifies the doc division. The doc number prefix includes a single digit capital alphanumeric division label D, followed by a two digit subdivision number ss. For example:
[rvDss-]file-name.py
rvB02-Beam-Loads.py
Author provided source file inputs
rivt reads and writes file types including:
description |
read file types |
|---|---|
Image files |
.png, .jpg, .jpeg |
Data files |
.csv, xlsx, |
Pandas dataframes |
.dat, html, hdf5, .json, xml, feather, parquet |
Formatted text files |
.txt, .tex, html, .md, .rst |
Shell and terminal commands |
.sh, .bat, .cmd |
Files for use in a rivt doc are read and written to default folders that may be changed by specifiying file paths relative to the rivt file. The
Report files written by rivtlib
rivt also generates and saves files that can be read by subsequent rivt files. When generating reports these are written to rv_stor folder and subfolders and include:
description |
written file types |
|---|---|
Value files |
.csv |
Stored sections |
.txt |
Log files |
.txt |
Python output |
.png, .jpg, .csv, .dat, xlsx |
Formatted text files |
.txt, .tex, html, .md, .rst |
Public rivt files |
.py |
Value files
A value file is a csv file that defines variable values. A values file is exported to rv_stor for each Values API call. The filename has the form:
vDss-S-rivtfile.csv
where Dss is the doc number, S is the section number, and rivtfile.csv is the original rivt file name. The file may be read using the VALUE command.
Log files
Log files include a backup of each rivt file and a record of most steps of rivt file processing and are written to the /logs subfolder of rv_stor. They are written when the PUBLISH command is executed. Each log file has the form:
log-Dss-rivtfile.txt
Python scripts
Python scripts can be run as a [[PYTHON]] block in the Run API or as an imported file in the Values API. The [[PYTHON]] block is written to rv_stor with label name. For consistentcy, Python output should also be directed to rv_stor.
Public rivt files
A public rivt file is a copy of the rivt file that includes all of the sections marked as public in the header. It has the same name as the rivt file with an added hyphen between “rv” and the docnumber e.g.
rv-Dss-filename.py