blob: 93d2de5bb17c5c76e8ee1b9cec66aaa50a9987ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Planète Casio's textout() BBcode markup language translator
===========================================================
This module contains a BBcode to HTML translator for
`Planète Casio`_. For more information, read the
documentation accessible on `the official website`_.
.. warning::
If you are accessing this repository from another forge (such as
`Planète Casio's forge <https://gitea.planet-casio.com/cake/textout>`_),
keep in mind that it is only a mirror and that the real repository
is located `in my forge <https://forge.touhey.org/pc/textout.git>`_
for now.
For example, if we want to translate some basic multi-block text to HTML:
.. code-block:: python
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))
.. _Planète Casio: https://www.planet-casio.com/
.. _the official website: https://textout.touhey.pro/
|