Command-Line Interface
XBridge provides a command-line interface for quick conversions without writing code.
Usage
xbridge INPUT_FILE [OPTIONS]
Arguments
Positional Arguments:
input_filePath to the input XBRL-XML file (required)
Optional Arguments:
--output-path PATHOutput directory path. If not specified, the output will be saved in the same directory as the input file.
--headers-as-datapointsTreat headers as datapoints in the output. Default is False.
--strict-validationRaise errors on validation failures. This is the default behavior.
--no-strict-validationEmit warnings instead of errors for validation failures. Use this to continue processing despite orphaned facts.
-h, --helpShow help message and exit.
CLI Examples
Basic conversion (output to same directory as input):
xbridge instance.xbrl
Specify output directory:
xbridge instance.xbrl --output-path ./converted
Continue with warnings instead of errors:
xbridge instance.xbrl --no-strict-validation
Include headers as datapoints:
xbridge instance.xbrl --headers-as-datapoints
Combine multiple options:
xbridge instance.xbrl \
--output-path ./output \
--headers-as-datapoints \
--no-strict-validation
Batch processing with shell:
# Convert all XBRL files in a directory
for file in instances/*.xbrl; do
xbridge "$file" --output-path converted/
done