Configuration

This package does not require specific configurations and runs out of the box. However, it uses certain files and folders to store different kind of data which can be modified via Environment variables.

Environment variables

EDITOR

Specifies the text editor to use for editing files. If not set, GNU nano is used as fallback.

SCI_AUTHOR

Author name used for different purposes (e.g. measurement operator suggestion, author of protocols). If not set, the user will be prompted to provide an author name.

XRDT_DATABASE

Specifies the path to the measurement database file (CSV). If not set, a default file path is used (~/.local/share/xrd-tools/measurements.csv).

XRDT_DEVICES

Specifies the path to the device file (JSON). If not set, a default file path is used (~/.local/share/xrd-tools/devices.json).

XRDT_LOG_DIR

Specifies the directory where log files are stored. If not set, a default directory in the user’s home directory is used (~/.local/share/xrd-tools/logs).

XRDT_MEASUREMENTS_DIR

Specifies the directory where measurements are stored. If not set, a default directory in the user’s home directory is used (~/XRD_measurements).

XRDT_PRESETS

Specifies the path to the preset file (JSON). If not set, a default file path is used (~/.local/share/xrd-tools/presets.json).

XRDT_TEMPLATE_DIR

Specifies the directory where custom measurement document templates are stored. If not set, a default directory in the user’s home directory is used (~/.local/share/xrd-tools/templates).

Definition of environment variables

The definition of the variable XRD_TOOLS_MEASUREMENTS_DIR is exemplarily demonstrated in the next paragraph.

Example: Setting the XRD Measurement Data Directory

To set the value of the XRD_TOOLS_MEASUREMENTS_DIR variable, you can use the export command in your shell:

export XRD_TOOLS_MEASUREMENTS_DIR="$HOME/XRD_data/measurements"

This command sets the value of the XRD_TOOLS_MEASUREMENTS_DIR variable to $HOME/XRD_data/measurements, which means that the measurement data is located in the measurements subdirectory of the XRD_data directory in your home directory ($HOME is a shell variable that refers to your home directory).

To make the value of the XRD_TOOLS_MEASUREMENTS_DIR variable persistent across sessions, you can add the export command to your shell profile file (e.g. ~/.bash_profile, ~/.zshrc, etc.). This will ensure that the variable is set every time you open a new terminal window.