-
Notifications
You must be signed in to change notification settings - Fork 1
Command line tools
The command line tool pbrst-cli is a direct interface to analyze a statement without running the bibref program. Its purpose is to perform the analysis for a single file, or, by calling it from external scripts, to multiple files.
Since pbrst-cli is a tool for advanced users, it requires building it from source.
Before building the tool, you need to install the same prerequisites
The following commands are required to build pbrst-cli:
git clone https://github.com/kovzol/bibref.git
cd statements
make
A quick summary for the usage of the tool can be run by issuing ./pbrst-cli -h. It gives the following output:
pbrst-cli [options] [input.brst], a command line brst parser
Options:
-h this help
-d switch debug mode on
-c colorize output
-g show only graphviz output
-r correct raw positions
-D correct differings
-C correct coverings
-v correct versification from KJV to LXX
-u show BRST dump
-U show only BRST dump
The options have the following meaning:
-
-dadds verbosity to the analysis, including debug messages of the bison/flex parsing step. -
-ccolorizes some parts of the analysis. -
-gomits all information given in the analysis, only the created GraphViz output is shown. -
-rtry to fix raw positions of headlines, introductory texts or fragments.In bibref, Bible passages are given with verses and raw positions. Raw positions are confirmed by lengths (but this is optional). If the lengths do not match the raw positions, then raw positions have priority, thus lengths are fixed accordingly, if
-ris set. If raw positions do not match the verses, then verses have priority, thus raw positions (and eventually, the lengths in those cases) are fixed accordingly. -
-Doverrides the incorrectly computed differings (based on the jaccard12 command) with the correct value. -
-Coverrides the incorrectly computed percentual covering with the correct value. -
-vassumest that versification in the input was given with the KJV schema, and the output will use the LXX schema. This feature is incomplete and not fully tested. -
-uprints the processed BRST dump, that is, it echoes the parsed and semantically checked, and eventually corrected statement file. It is a requirement that the input can be at least syntactically parsed. -
-Ubehaves like-u, but all other outputs are omitted.
-
./pbrst-cli -g StatResGNT/Matthew/Matthew-2,6.brstoutputs a GraphViz file to visualize the input statement. -
./pbrst-cli -g StatResGNT/Matthew/Matthew-2,6.brst > Matthew-2,6.gvoutputs a GraphViz file to visualize the input statement. -
./pbrst-cli -g StatResGNT/Matthew/Matthew-2,6.brst | dot -Tsvg > Matthew-2,6.svgcreates an SVG output of the visualized statement. -
./pbrst-cli -g StatResGNT/Matthew/Matthew-2,6.brst | dot -Tsvg > Matthew-2,6.svg && sensible-browser Matthew-2,6.svgshows the visualized statement in the default web browser.
-
./pbrst-cli -r -U test.brst > test-corrected.brstcorrects raw positions and saves the corrected file in another file. -
./pbrst-cli -r -D -C -U test.brst > test-corrected.brstfixes all correctable errors and saves the corrected file in another file.
-
./pbrst-cli -U test.brstprints the input file in auto-indented format on stdout. Comments (written after hashmarks) will be removed.