def __init__(self, id, title, data, export_dir, authors=[], modifiedTime=None, theme=None, editable_by_anyone=False, template='document', appliances=None, config={}):
log.info('Process document %s %s', id, title)
if theme is None:
self._theme = Theme(export_dir)
else:
self._theme = theme
self._template = template
self._config = config
self._export_dir = export_dir
self._authors = authors
self._modifiedTime = modifiedTime
self._data = data
self._title = title
self._appliances = appliances
self._id = id
self._html = lxml.html.fromstring(self._data)
text = html_to_text(self._data)
text = re.sub('\n\n+', '\n\n', text)
self._text = text.replace('\n', '<br/>')
self._editable_by_anyone = editable_by_anyone
评论列表
文章目录