SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 27/12/2017, 02:37 PM   #1
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,835
Reputation: 1405
Default Markdown to BBCode for SA:MP Releases from GitHub

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:

Code:
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 Code:
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:
[LIST]
[*]
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
[/LIST] 
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:

Code:
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:

Code:
forumfmt README.md README.bbcode
Or by piping to stdin and/or stdout on Unix platforms:

Code:
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:

Code:
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.
__________________




Last edited by [HLF]Southclaw; 27/04/2018 at 11:33 AM.
[HLF]Southclaw is offline   Reply With Quote
Old 27/12/2017, 02:52 PM   #2
ThePhenix
Gangsta
 
ThePhenix's Avatar
 
Join Date: May 2012
Posts: 825
Reputation: 153
Default Re: Markdown to BBCode for SA:MP Releases from GitHub

Very interesting.
ThePhenix is offline   Reply With Quote
Old 27/12/2017, 02:53 PM   #3
rfr
Banned
 
Join Date: Nov 2017
Posts: 309
Reputation: 43
Default Re: Markdown to BBCode for SA:MP Releases from GitHub

thank you
rfr is offline   Reply With Quote
Old 27/04/2018, 11:30 AM   #4
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,666
Reputation: 3061
Default Re: Markdown to BBCode for SA:MP Releases from GitHub

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:

Code:
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 Code:
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:
[LIST]
[*]
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
[/LIST] 
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:

Code:
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:

Code:
forumfmt README.md > README.bbcode
Or by piping to stdin on Unix platforms:

Code:
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:

Code:
forumfmt README.md README.bbcode southclaws.json
Y_Less is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sensation Roleplay Releases - Github Sn00Py Rom‚nă/Romanian 9 01/05/2017 06:34 PM
[Tool/Web/Other] PAWN Documentation to GitHub Markdown. Ahmad45123 Tools and Files 9 02/01/2017 07:54 AM


All times are GMT. The time now is 04:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.