C.2 | rivt File#

[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 division and subdivision of the doc. rivt reports are assembled using doc numbers. 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 a variety of files 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 stored in the rvsrc folder and any author created subfolders. File paths are give relative to the rivt-report folder. Files are read using rivt commands. For example, to read and insert an image file in the author created subfolder img the command would be:

IMAGE | rvscr/img/filename.png | parameters

Available commands and tags depend on the API function, summarized here

Source files generated by rivtlib

rivt also generates files that can be read by subsequent rivt files. These generated files are written to the 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 file with all values is written 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

[2] Folder Names#

Reports are organized using the folllowing folders and subfolders.

rivt- report-label

Top level report folder containing rivt report and public files.

_rivt-public

Includes public rivt files designated byt the author written by rivtlib for public sharing. The prefix rvAnn- is changed to rv-Ann- to avoid confusion with non-public files.

rivt-report

Includes files and folders for publishing docs and reports.

required subfolders of rivt-report

rvsrc

Includes author provided source files used by rivt files including data, images, run commands, tools and value files.

rv_stor

Includes output files written by rivtlib including logs, values, hidden sections and metadata that may be read by other rivt files.

_published

Formatted docs and reports written by rivtlib for publication. Subfolders include docs (HTML), pdfdocs (PDF) and txtdocs (text).

_rstdocs

Intermediate restructured text files written by rivtlib.