Code Formatter I’m Working On

Yep, I’ve been programming a little in the past few days. A couple of months ago I “talked a little about post formatting”: and how I thought the BB-codes that today are used (like [b]bla bla bla[/b] for bold) are really not that great. Right now I’m working on my own ASCII to HTML converter that does it the way I want.

I thought I’d just put up a little demo: “you can find the demo here”:

These are some of the informal functional requirements that I formulated for it:
* The codes should be quick to type
* It should be suitable for academia and in the future should be do the most things academia need to do (including formulas)
* It should never get in the way, and if it is in the way you should be able to get it out of the way (hence the <noformat> tag)
* I should be consistent and easily adaptible for use in a Wiki. That’s why linking right now is done using the [[link text]]( syntax. This allows for conistent inclusion of [[a wiki term]] or a link to a wiki term: [[some text]](the wiki term) later on.
* It should make it possible to do western non-ASCII characters such as éä etc. fairly easily. I chose the ‘e and “a syntax for this, which is LaTeX-like. See the demo for more special characters.
* It should be able to do bold, italic, underlined, links, images, headings (three levels), tables, lists (both ordered and unordered, multi-level)
* It should have processor tags which can be application-specific. By default I’ve included <code>, <html> (disabled in the demo for security reasons) and <noformat>. But in the future I’ll try to add more, such as <math> (which should translate TeX formulas into the correct representation (in an image, using LaTeX). It should be really easy add new processors.

Much of this is already operational (except for image and formula support) and should operate reasonably well. If you discover any bugs, please report them, I very much appreciate it. Also: I need a name for the formatter.

I’ve written it in Python and I’ll probably release the code (right now only 275 lines) when it’s more stable. Any feedback and suggestions are welcome.