E.2 Public rivt files#

[1t] Overview#


A feature of rivt is fine-grained control over public sharing of all or parts of a rivt file. Public rivt files are generated by rivtlib on a section by section basis defined by the API header substring. Each API function defines a section and has a public/private setting in the header. Sections are private by default (see [2t] Header substring).

rv._("""Section Label | doc;stored, private;public, section;merge

     Content substring indented 4 spaces

    ...

    """)

Sections are written to a rivt file in the /public folder with a file name composed as:

rivt file name

    rvAnn-filename.py

modified with an additional hyphen

    rv-Ann-filename.py

The public folder may be uploaded to a GitHub repo for public sharing. When downloaded the extra hyphens may be removed with a batch remove command (e.g. in VSCode).

[2t] Public Folder#


For each rivt file that is published a corresponding public rivt file is written to the public folder. The default contents of the file are the API rivt string headers. If the header parameter public is included in the header, the rivt string content is also written to the public rivt file.

[rivt]-Report-Label/                Report Folder Name
    ├── [rv101-]filename1.py        | rivt file
    ├── [rv102-]filename2.py        | rivt file
    ├── [rv201-]filename3.py        | rivt file
    ├── [rv202-]filename4.py        | rivt file

    ...

    ├── [public]/                   || public rivt files
        ├── rv-101-filename1.py
        ├── rv-102-filename1.py
        ├── rv-201-filename3.py
        └── rv-202-filename4.py

The public folder can be uploaded to a public repository and updated with Git as the project develops.

[3t] Example#


to be added