Install the NPM package globally and use it from the command line for a quick conversion:
npm install -g ourbigbook
printf 'ab\ncd\n' | ourbigbook --body-only
or to a file:
printf 'ab\ncd\n' | ourbigbook > tmp.html
You almost never want to do this except when developing OurBigBook, as it won't be clear what version of ourbigbook the document should be compiled with. Just be a good infant and use OurBigBook with the template that contains a package.json via npx, OK?
Furthermore, the default install of Chromium on Ubuntu 21.04 uses Snap and blocks access to dotfiles. For example, in a sane NVM install, our global CSS would live under /home/ciro/.nvm/versions/node/v14.17.0/lib/node_modules/ourbigbook/dist/ourbigbook.css, which gets blocked because of the .nvm part:
One workaround is to use --embed-resources, but this of course generates larger outputs.
To run master globally from source for development see: Section "Run OurBigBook master". This one actually works despite the dotfile thing since your development path is normally outside of dotfiles.
Try out the JavaScript API with lib_hello.js:
npm install ourbigbook
OurBigBook CLI is a program that users can run in their own computers, and which converts input OurBigBook Markup files (file extension: .bigb) into .html files which make up a wiki or book.
The HTML files can then be either viewd from your filesystem on a browser, or uploaded and hosted very cheaply or for free so that others can see it, e.g. on GitHub Pages.
Or if you are a programmer: OurBigBook CLI is a Static Wiki generator that can be invoked from the command line with the ourbigbook executable.
OurBigBook CLI is how is published.
OurBigBook Web takes as input the exact same format of OurBigBook Markup files used by OurBigBook CLI. TODO support/improve import/export to/from OurBigBook Web, see also: -W, --web.
The OurBigBook CLI calls the OurBigBook Library to convert each input file.
Convert a .bigb file to HTML and output the HTML to a file with the same basename without extension, e.g.:
ourbigbook hello.bigb
firefox hello.html
Files named README.bigb are automatically converted to index.html so that they will show on both GitHub READMEs and at the website's base address:
ourbigbook README.bigb
firefox hello.html
Convert all .bigb files in a directory to HTML files next to each corresponding .bigb file, e.g. somefile.bigb to somefile.html:
ourbigbook .
The HTML output files are placed right next to each corresponding .bigb.
The output file can be selected explicitly with: --outfile <outfie>.
Output to stdout instead of saving it to a file:
ourbigbook --stdout README.bigb
In order to resolve cross file references, this actually does two passes:
  • first an ID extraction pass, which parses all inputs and dumps their IDs to the ID database
  • then a second render pass, which uses the IDs in the ID database
Convert a .bigb file from stdin to HTML and output the contents of <body> to stdout:
printf 'ab\ncd\n' | ourbigbook --body-only