Crates.io | fimdoc |
lib.rs | fimdoc |
version | 0.6.1 |
source | src |
created_at | 2023-12-06 20:51:46.072426 |
updated_at | 2024-05-12 04:02:51.073628 |
description | Firendship is Magic Document, converts Markdown into FIMFiction BBCode. |
homepage | |
repository | https://github.com/SilkRose/Pony |
max_upload_size | |
id | 1060390 |
size | 18,886 |
Converts Markdown into FIMFiction BBCode.
Here are examples for how to use the FimDoc executable, and the FimDoc parser library.
Run with an input and an output file:
fimdoc input.md output.txt
Run with stdin and an output file:
md | fimdoc output.txt
Run with an input file and stdout:
fimdoc input.md | bbcode
Run with stdin and stdout:
md | fimdoc | bbcode
FimDoc has the following command line options, only one of which can be provided at a time.
-w | --warn (default) >> Warns the user in yellow on unsupported markdown syntax.
-f | --fail >> Errors in red before terminating on unsupported markdown syntax.
-q | --quiet >> Ignores and skips over unsupported markdown syntax.
Here are some examples of their use:
fimdoc -q input.md output.txt
md | fimdoc --fail output.txt
Run the parse function with the markdown string and WarningType enum.
let md = "# Hello World!".to_string();
let warn = WarningType::Quiet;
let bbcode = parse(md, &warn);
println!("{bbcode}");
Would produce:
[h1]
Hello World!
[/h1]