|
a/src/filters/rclppt.py |
|
b/src/filters/rclppt.py |
|
... |
|
... |
13 |
import os
|
13 |
import os
|
14 |
|
14 |
|
15 |
class PPTProcessData:
|
15 |
class PPTProcessData:
|
16 |
def __init__(self, em):
|
16 |
def __init__(self, em):
|
17 |
self.em = em
|
17 |
self.em = em
|
18 |
self.out = ""
|
18 |
self.out = b""
|
19 |
self.gotdata = 0
|
19 |
self.gotdata = 0
|
20 |
|
20 |
|
21 |
def takeLine(self, line):
|
21 |
def takeLine(self, line):
|
22 |
if not self.gotdata:
|
22 |
if not self.gotdata:
|
23 |
self.out += '''<html><head>''' + \
|
23 |
self.out += b'''<html><head>''' + \
|
24 |
'''<meta http-equiv="Content-Type" ''' + \
|
24 |
b'''<meta http-equiv="Content-Type" ''' + \
|
25 |
'''content="text/html;charset=UTF-8">''' + \
|
25 |
b'''content="text/html;charset=UTF-8">''' + \
|
26 |
'''</head><body><pre>'''
|
26 |
b'''</head><body><pre>'''
|
27 |
self.gotdata = True
|
27 |
self.gotdata = True
|
28 |
self.out += self.em.htmlescape(line) + "<br>\n"
|
28 |
self.out += self.em.htmlescape(line) + b"<br>\n"
|
29 |
|
29 |
|
30 |
def wrapData(self):
|
30 |
def wrapData(self):
|
31 |
return self.out + '''</pre></body></html>'''
|
31 |
return self.out + b'''</pre></body></html>'''
|
32 |
|
32 |
|
33 |
class PPTFilter:
|
33 |
class PPTFilter:
|
34 |
def __init__(self, em):
|
34 |
def __init__(self, em):
|
35 |
self.em = em
|
35 |
self.em = em
|
36 |
self.ntry = 0
|
36 |
self.ntry = 0
|