[Tool/Web/Other] Markdown to BBCode for SA:MP Releases from GitHub - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (
https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] Markdown to BBCode for SA:MP Releases from GitHub (
/showthread.php?tid=646955)
Markdown to BBCode for SA:MP Releases from GitHub -
[HLF]Southclaw - 27.12.2017
forumfmt
Maintaining documentation is already difficult, maintaining it on two different platforms in two different formats is just annoying.
Overview
This tool means you can simply have a single markdown readme file in your project’s repo and when you post it to the forums or update the topic, all you need to do is simply run this tool over the markdown text to generate BBCode.
For example, this:
Код:
The Swiss Army Knife of SA:MP - vital tools for any server owner or library
maintainer.
## Overview
Server management and configuration tools:
* Manage your server settings in JSON format (compiles to server.cfg)
* Run the server from `sampctl` and let it worry about automatic restarts
* Automatically download Windows/Linux server binaries when you need them
becomes this:
PHP код:
The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
[COLOR="RoyalBlue"][size="6"][B]Overview[/B][/size][/COLOR]
Server management and configuration tools:
Manage your server settings in JSON format (compiles to server.cfg)
Run the server from [FONT="courier new"]sampctl[/FONT] and let it worry about automatic restarts
Automatically download Windows/Linux server binaries when you need them
And, as you can probably guess by now, this topic was generated using the tool!
Installation
The app is a simple Go app so just
go get it:
Код:
go get github.com/Southclaws/forumfmt
If you don’t have Go installed, there are precompiled binaries available
on the releases page.
Usage
Then you can use the command, either by passing input and output files as an argument:
Код:
forumfmt README.md README.bbcode
Or by piping to stdin and/or stdout on Unix platforms:
Код:
cat README.md | forumfmt > README.bbcode
You can also specify a style file to use, to determine the forum look, but only when all parameters are given:
Код:
forumfmt README.md README.bbcode southclaws.json
The available styles are:
- southclaws.json
- yless.json
Feel free to PR more styles if you want, just copy the existing
.json files.
Re: Markdown to BBCode for SA:MP Releases from GitHub -
ThePhenix - 27.12.2017
Very interesting.
Re: Markdown to BBCode for SA:MP Releases from GitHub -
rfr - 27.12.2017
thank you
Re: Markdown to BBCode for SA:MP Releases from GitHub -
Y_Less - 27.04.2018
And if you want your own style, you now can. This was generated directly from the same input as the first post, but with my post styling applied:
Quote:
forumfmt

Maintaining documentation is already difficult, maintaining it on two different platforms in two different formats is just annoying.
Overview
This tool means you can simply have a single markdown readme file in your project’s repo and when you post it to the forums or update the topic, all you need to do is simply run this tool over the markdown text to generate BBCode.
For example, this:
Код:
The Swiss Army Knife of SA:MP - vital tools for any server owner or library
maintainer.
## Overview
Server management and configuration tools:
* Manage your server settings in JSON format (compiles to server.cfg)
* Run the server from `sampctl` and let it worry about automatic restarts
* Automatically download Windows/Linux server binaries when you need them
becomes this:
PHP код:
The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
[COLOR="RoyalBlue"][size="6"][B]Overview[/B][/size][/COLOR]
Server management and configuration tools:
Manage your server settings in JSON format (compiles to server.cfg)
Run the server from [FONT="courier new"]sampctl[/FONT] and let it worry about automatic restarts
Automatically download Windows/Linux server binaries when you need them
And, as you can probably guess by now, this topic was generated using the tool!
Installation
The app is a simple Go app so just go get it:
Код:
go get github.com/Southclaws/forumfmt
If you don’t have Go installed, there are precompiled binaries available on the releases page.
Usage
Then you can use the command, either by passing a file as an argument:
Код:
forumfmt README.md > README.bbcode
Or by piping to stdin on Unix platforms:
Код:
cat README.md | forumfmt > README.bbcode
You can also specify a style file to use, to determine the forum look, but only when all parameters are given:
Код:
forumfmt README.md README.bbcode southclaws.json
|