Converter.MarkdownToBBCodeSteam.Tool
1.0.0.28
See the version list below for details.
dotnet tool install --global Converter.MarkdownToBBCodeSteam.Tool --version 1.0.0.28
dotnet new tool-manifest
dotnet tool install --local Converter.MarkdownToBBCodeSteam.Tool --version 1.0.0.28
#tool dotnet:?package=Converter.MarkdownToBBCodeSteam.Tool&version=1.0.0.28
nuke :add-package Converter.MarkdownToBBCodeSteam.Tool --version 1.0.0.28
Converter.MarkdownToBBCode
Converts Markdown and HTML (GitHub flavor) into NexusMods and Steam BBCode flavor. Might be opionated with the HTML conversion, since there are a few ways to interpret HTML
Installation
dotnet tool install -g Converter.MarkdownToBBCodeNM.Tool
dotnet tool install -g Converter.MarkdownToBBCodeSteam.Tool
Usage
When installed as a global tool:
# NexusMods
markdown_to_bbcodenm -i "**raw markdown**"
markdown_to_bbcodenm -i "~~raw\r\nmarkdown~~" --disableextended
markdown_to_bbcodenm -i "/markdown.md";
markdown_to_bbcodenm -i "/markdown.md" -o "/bbcode.txt";
# Steam
markdown_to_bbcodesteam -i "**raw markdown**"
markdown_to_bbcodesteam -i "~~raw\r\nmarkdown~~" --disableextended
markdown_to_bbcodesteam -i "/markdown.md";
markdown_to_bbcodesteam -i "/markdown.md" -o "/bbcode.txt";
-i or --input accepts both raw markdown and a file path.
-o or --output accepts a file path. If specified, will write the
converted BBCode to the file instead of outputting to the console.
-d or --disableextended will disable newline detection via two spaces
and will disable HTML conversion
Example
At the time of writing the tool, it was used to keep in sync the description of the BLSE mod for Bannerlord.
BLSE - GitHub → NexusMods
MCM - GitHub → NexusMods & GitHub → Steam
Notes
- You can ignore an HTML element by adding
converter_ignore,converter_nexusmods,converter_steamattribute to the element<p converter_ignore>WILL NOT BE CONVERTED TO BBCODE</p> <p converter_nexusmods>WILL NOT BE CONVERTED TO BBCODE FOR STEAM</p> <p converter_steam>WILL NOT BE CONVERTED TO BBCODE FOR NEXUSMODS</p> - You can set an alternative
hreffor a link for NexusMods/Steam by adding anexusmods_hreforsteam_hrefattribute to the element<a href="MARKDOWN_LINK" nexusmods_href="NEXUSMODS_LINK" /> </a> - You can set an alternative
srcfor an image for NexusMods/Steam by adding anexusmods_srcorsteam_srcattribute to the element<img src="MARKDOWN_IMAGE" nexusmods_src="NEXUSMODS_IMAGE" />
Supporting Codes
GitHub Markdown Supported HTML Codes
Steam Supported BBCode Codes
| NexusMods BBCode | Steam BBCode | Markdown (GitHub) | HTML |
|---|---|---|---|
| [b]TEXT[\b] | [b]TEXT[\b] | **TEXT** | <b>TEXT</b> |
| [i]TEXT[/i] | [i]TEXT[/i] | *TEXT* | <i>TEXT</i> |
| [u]TEXT[/u] | [u]TEXT[/u] | <ins>TEXT</ins> OR <u>TEXT</u> | |
| [s]TEXT[/s] | [strike]TEXT[/strike] | ~~TEXT~~ | <s>TEXT</s> OR <strike>TEXT</strike> |
| [url=URL]TEXT[/url] | [url=URL]TEXT[/url] | [TEXT](URL) | <a href="URL">TEXT</a> |
| [img]URL[/img] | [img]URL[/img] |  | <img src="URL"></img> |
| [quote]TEXT[/quote] | [quote]TEXT[/quote] | > TEXT | <blockquote>TEXT</blockquote> |
| [quote AUTHOR]TEXT[/quote] | [quote=AUTHOR]TEXT[/quote] | > TEXT | |
| [code]CODE[/code] | [code]CODE[/code] | ```CODE``` | <code>CODE</code> |
| [ol][li]ENTRY[/li][/ol] | [olist][*]ENTRY[/olist] | 1. ENTRY | <ol><li>ENTRY</li></ol> |
| [ul][li]ENTRY[/li][/ul] | [list][*]ENTRY[/list] | * ENTRY | <ul><li>ENTRY</li></ul> |
| [line] | [hr][/hr] | <hr/> | |
| [color=COLOR]TEXT[/color] | |||
| [font=FONT]TEXT[/font] | |||
| [center]TEXT[/center] | <p align="center">TEXT</p> OR <div align="center">TEXT</div> | ||
| [right]TEXT[/right] | <p align="right">TEXT</p> OR <div align="right">TEXT</div> | ||
| [left]TEXT[/left] | <p align="left">TEXT</p> OR <div align="left">TEXT</div> | ||
| [size=1]TEXT[/size] | [b]TEXT[/b] | ###### TEXT | <h6>TEXT</h6> |
| [size=2]TEXT[/size] | [b]TEXT[/b] | ##### TEXT | <h5>TEXT</h5> |
| [size=3]TEXT[/size] | [b]TEXT[/b] | #### TEXT | <h4>TEXT</h4> |
| [size=4]TEXT[/size] | [h3]TEXT[/h3] | ### TEXT | <h3>TEXT</h3> |
| [size=5]TEXT[/size] | [h2]TEXT[/h2] | ## TEXT | <h2>TEXT</h2> |
| [size=6]TEXT[/size] | [h1]TEXT[/h1] | # TEXT | <h1>TEXT</h1> |
| [spoiler]SUMMARY\n\rTEXT[/spoiler] | INLINE SPOILERS NOT MAPPED TO HTML | <details><summary>SUMMARY</summary>TEXT</details> | |
| [youtube]ID[/youtube] | https://www.youtube.com/watch?v=ID | [https://www.youtube.com/watch?v=ID](https://www.youtube.com/watch?v=ID) |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.