Planète Casio's textout() BBcode markup language translator
For example, if we want to translate some basic multi-block text to HTML:
from textoutpc import tohtml text = """[img=center]https://www.planet-casio.com/skins/bootstrap/img/default/logo.png[/img] Hello [color=R10]world[/color]! [ul] [*]This module is made by [url=https://thomas.touhey.fr/]Thomas Touhey[/url]! [*]Use `.tohtml()` to translate magically to HTML! [/] """ print(tohtml(text))
What is left to do for the next release
- Fix the not-passing unit test ([color=blue]oh[youtube]h4WLX8hfpJw).
- Produce a test stylesheet for demonstration purposes.
- Manage lightscript (or even markdown?) as output languages;
- Check where the errors are to display them to the user:
- Count character offset, line number and column number in the lexer;
- Produce readable exceptions;
- Make a clean interface to transmit them;
- Check why exceptions on raw tags effectively escape the content, as it shouldn't…?
- Look for security flaws (we really don't want stored XSS flaws!).
- Implement match names (such as \[\*+\] for lists).
- Manage keywords with tags such as [tag key=value other="something else"].