from lyrics import parse def lyricsparse text text hello preved little

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from lyrics import parse
def lyricsparse(text):
"""
>>> text = u'''hello preved
... >>A little test
... You must die<<
... (maybe you wanna die?)
... Tru #1#mega## #2#test##
... '''
>>> print parse(text)
hello preved <br>
<div class="chorus">A little test <br>
You must die</div> <br>
<span class="paren">(maybe you wanna die?)</span> <br>
Tru #1#mega## #2#test## <br>
<BLANKLINE>
"""
return parse(text)
if __name__ == '__main__':
import doctest
doctest.testmod()