Top-rated recipes tagged "bbcode"http://code.activestate.com/recipes/tags/bbcode/top/2009-07-04T20:03:55-07:00ActiveState Code RecipesSimple BBCode Support (Python)
2009-07-04T20:03:55-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/576831-simple-bbcode-support/
<p style="color: grey">
Python
recipe 576831
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/bbcode/">bbcode</a>).
Revision 8.
</p>
<p>After trying to write a BBCode support library, I decided that less in more. Though incomplete in its support of BBCode, it handles most cases with a minimal amount of code. Simply type "BBCode." followed by the operator. Call this with the text to be wrapped along with any arguments that operator may take. The virtual methods are case-sensitive, but the rendered names are returned in upper-case. If you are trying to write some forum-related software and want a lite BBCode implimentation, this recipe may serve your purposes well. The only aspect of this project that might be fixed at the user's discretion is support for numbered and bulleted lists (to be added to the _BBCode class as methods).</p>