- BBCode to Wiki Markup - BBCtoWiki [JS/HTML]
- 19 Jul 2016 11:56:12 am
- Last edited by Unicorn on 08 Aug 2017 12:47:04 am; edited 4 times in total
I've found that we need a program to convert BBCode (The formatting that the forum uses) to Wiki Markup (The formatting that mediawiki uses, in turn, Learn @ Cemetech). It will make it easy to bring tutorials written on the forum into the wiki.
So uh, I discovered Electron and decided to move this app over to it to kinda learn how electron goes. Anyways, I moved everything to Javascript and learned a little regex, as well as implemented html support. Check it out!
BBCode to Wiki Markup Converter
OLD
-------------------------------
I will be using Ruby to write it, with Shoesfor a gui. It will not support images, tables, lists, fonts, and colors right away, if ever. It will definitely support code, bold, italics, underlines, and urls.
The one problem I have is figuring out how to distribute it. Using Ocra, the gem that lets you package your script into a .exe file doesn't quite work, and I'm unsure how I would be able to host it online.
Here's an example that uses all of the converted functions:
BBCtoWiki Example
Wassup! This is an example!
[s]Strike this text, it makes no sense![/s]
And don't forget an image!
Lets indent this code, as well!
---------------------------------------------------------------------
That was the post, here's the BBC:
Code:
-------------------------------------------------------------------
And here is the Wiki Markup:
Code:
----------------------------------------------
Go here to see an example of the Wiki Markup: https://www.cemetech.net/learn/Bbcodeconvertexample
So uh, I discovered Electron and decided to move this app over to it to kinda learn how electron goes. Anyways, I moved everything to Javascript and learned a little regex, as well as implemented html support. Check it out!
BBCode to Wiki Markup Converter
OLD
-------------------------------
I will be using Ruby to write it, with Shoesfor a gui. It will not support images, tables, lists, fonts, and colors right away, if ever. It will definitely support code, bold, italics, underlines, and urls.
The one problem I have is figuring out how to distribute it. Using Ocra, the gem that lets you package your script into a .exe file doesn't quite work, and I'm unsure how I would be able to host it online.
Here's an example that uses all of the converted functions:
BBCtoWiki Example
Wassup! This is an example!
[s]Strike this text, it makes no sense![/s]
And don't forget an image!
Lets indent this code, as well!
Code:
codecodecode codecodecode codecodecode
codecodecode codecodecode
codecodecode
codecodecode
codecodecode codecodecode codecodecode
---------------------------------------------------------------------
That was the post, here's the BBC:
Code:
[size=24]BBCtoWiki Example[/size]
[i]Wassup! [b]This is an example![/i][/b]
[s]Strike this text, it makes no sense![/s]
[size=12]And don't forget an image![/size]
[img]https://www.cemetech.net/forum/templates/Cemetech6/images/logo.png[/img]
Lets indent this code, as well!
[list][code]codecodecode codecodecode codecodecode
codecodecode codecodecode
codecodecode
codecodecode
codecodecode codecodecode codecodecode
[/code]
[/list][url=http://www.google.com]google[/url]
-------------------------------------------------------------------
And here is the Wiki Markup:
Code:
== BBCtoWiki Example ======
''Wassup! ''''This is an example!'''''
<strike>Strike this text, it makes no sense!</strike>
==== And don't forget an image! ======
https://www.cemetech.net/forum/templates/Cemetech6/images/logo.png
Lets indent this code, as well!
<blockquote><pre>codecodecode codecodecode codecodecode
codecodecode codecodecode
codecodecode
codecodecode
codecodecode codecodecode codecodecode
</pre>
</blockquote>[http://www.google.com google]
----------------------------------------------
Go here to see an example of the Wiki Markup: https://www.cemetech.net/learn/Bbcodeconvertexample