document.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:gns3-documentation-template 作者: GNS3 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号