Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chijete/bblm
- Owner: chijete
- Created: 2024-01-29T00:22:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-20T01:48:06.000Z (3 months ago)
- Last Synced: 2024-08-20T05:28:30.866Z (3 months ago)
- Language: PHP
- Size: 1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.