Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chijete/bblm

Markup language for BitBook Lite's manuscripts
https://github.com/chijete/bblm

Last synced: 7 days ago
JSON representation

Markup language for BitBook Lite's manuscripts

Awesome Lists containing this project

README

        

# BBLM: BitBook Lite Manuscript
BBLM is the markup language for BitBook Lite's manuscripts.

## TL;DR
BBLM is the markup language used in BitBook Lite scripts.
The `BBLM.php` file contains the code that allows you to translate BBLM to HTML and vice versa.

## File extension
BBLM official file extension is `.bblm` and mime type is `text/bblm`, although it can also be stored as plain text (`.txt` and `text/plain`).

## How to use
The class `BBLM` inside `BBLM.php` file has the following methods:
- `__construct` start an instance of the class.
- `BBLMtoHTML` translates a string in BBLM to HTML. Arguments:
- `$base_string`: **(string)** BBLM input string.
- `$delete_breaklines`: **(bool)** decides whether to remove line breaks from $base_string (\r\n).
- `$e_htmlentities`: **(bool)** decides whether to apply PHP's htmlentities function to $base_string.
- `HTMLtoBBLM` translates a string in HTML to BBLM. Arguments:
- `$base_string`: **(string)** HTML input string.
- `$hard_conversion`: **(bool)**.
- `BBLMtoPlainText` translates a string in BBLM to plain text. Arguments:
- `$base_string`: **(string)** BBLM input string.
- `$delete_breaklines`: **(bool)** decides whether to remove line breaks from $base_string (\r\n).

## Examples
You can find use examples inside `test` folder.