A Better Markdown

BLUEPHRASE

Compile BLUEPHRASE / Decompile HTML

by Read Write Tools
Abstract
The bluephrase JavaScript library and CLI tool is for compiling documents encoded in BLUEPHRASE notation into HTML; and for decompiling HTML documents back into BLUEPHRASE notation.

Summary

See the BLUEPHRASE website for documentation.

Installation

The bluephrase library may be installed directly from github or via NPM.

Node.js CLI

To install and run the CLI:

[user@host]# npm install -g bluephrase

[user@host]# bluephrase --help

BluePhrase Processor
general usage: blue [command] [file paths] [options]

for a description of commands and options:
blue help --version
blue help --commands list CLI commands
blue help --patterns list CLI file patterns
blue help --options list processor options
blue help --emitters list emit options
blue help --pragmas list compiler pragmas
blue help --shorthand list BluePhrase shorthand directive symbols
blue help --marks list BluePhrase marked text syntax
blue help --all list all commands, file patterns, options, emitters, pragmas, shorthand, marks

FILE PATH PATTERNS:
1 file - instruction-file
2 files - input-file output-file
2 paths - input-path output-path
2 paths - 'input-path/*' output-path (glob matching needs to be quoted)
3 files - input-file output-file instruction-file
3 paths - input-path output-path instruction-file

Node.js API

Sample node.js API usage, reading and writing BLUEPHRASE using the fileInterface exported from BluePhraseLib.

import BluePhraseLib from '/bluephrase/api/blue.lib.js';

var fileInterface = new FileInterface();
var rootEntity = fileInterface.readFile(pfInput.name);
fileInterface.writeFile(rootEntity, pfActual.name);

Browser

To install and use the API on a website project:

[user@host]# git clone https://github.com/readwritetools/bluephrase.git

Sample web frontend to read and write a BLUEPHRASE document using the textInterface exported from BluePhraseLib.

import BluePhraseLib from '/bluephrase/api/blue.lib.js';

var textInterface = new TextInterface();
var rootEntity = textInterface.readText(blueTextFromUser);
var blueTextFromEntityTree = textInterface.writeText(rootEntity);

Metadata

Dependencies

This library depends on softlib and iolib and joezone, which should be installed side-by-side.

Module exports

ES modules true
Common JS false

Suitability

Browser API
node.js API and CLI

Availability

Read Write Hub logo Documentation Read Write Hub
git logo Source code github
npm logo Package installation npm

License

The bluephrase library is not freeware. After evaluating it and before using it in a public-facing website, eBook, mobile app, or desktop application, you must obtain a license from Read Write Tools as part of the RWSERVE HTTP/2 Server.

BLUEPROCESSOR Software License Agreement

Copyright © 2023 Read Write Tools. All Rights Reserved.

The BLUEPROCESSOR software library is licensed as follows:

  1. This Software License Agreement ("Agreement") is a legal contract between you and Read Write Tools ("RWT"). The "Materials" subject to this Agreement include the BLUEPROCESSOR software, "BLUEPHRASE symbolic endophrasing", and associated documentation.
  2. By installing a Read Write Tools App ("RWTA") that incorporates these Materials, you agree to abide by the separate terms and conditions of this Agreement, which extend the terms and conditions of the RWTA that uses it.
  3. The Materials are protected by United States copyright law, patent law, and trade secret law, as well as international treaties on intellectual property rights. The Materials are licensed, not sold to you, and can only be used in accordance with the terms of this Agreement. RWT is and remains the owner of all titles, rights and interests in the Materials, and RWT reserves all rights not specifically granted under this Agreement.
  4. Subject to the terms of this Agreement, RWT hereby grants to you a limited, non-exclusive license to use the Materials subject to the following conditions:
    • You are allowed to install the BLUEPROCESSOR software on more than one computer or device, in accordance with the terms and conditions of the original RWTA that installed it.
    • You are allowed to use BLUEPROCESSOR symbolic endophrasing within digital manuscripts and digital data structures when used in conjunction with the BLUEPROCESSOR software.
    • Separate use of BLUEPROCESSOR symbolic endophrasing, in whole or in part, is not permitted.
    • You may not distribute, publish, make publicly available, sub-license, sell, rent, or lease the BLUEPROCESSOR.
    • You may not extract, decompile, or reverse engineer any binary or source code included in the BLUEPROCESSOR.
    • Your license to use the BLUEPROCESSOR is limited to the original RWTA that installed it, and does not include permission to extract, link to, or use parts on a separate basis.
  5. THE MATERIALS ARE PROVIDED BY READ WRITE TOOLS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL READ WRITE TOOLS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  6. This license is effective until terminated in accordance with the original RWTA that installed it. Without prejudice to any other rights, RWT may terminate your right to use the Materials if you fail to comply with the terms of this Agreement. In such event, you shall uninstall and delete all copies of the Materials.
  7. This Agreement is governed by and interpreted in accordance with the laws of the State of California. If for any reason a court of competent jurisdiction finds any provision of the Agreement to be unenforceable, that provision will be enforced to the maximum extent possible to effectuate the intent of the parties and the remainder of the Agreement shall continue in full force and effect.

BLUEPHRASE — Compile BLUEPHRASE / Decompile HTML

🔗 🔎