sdserver.py 文件源码

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

项目:slidoc 作者: mitotic 项目源码 文件源码
def rebuild(self, uploadType='', indexOnly=False, make='', log_dict=False):
        if uploadType:
            utypes = [uploadType] if uploadType != TOP_LEVEL else []
        else:
            utypes = self.get_session_names()

        if not indexOnly:
            WSHandler.lockAllConnections('Site rebuilt. Reload page', reload=True)

        msg_dict = {}
        msg_list = []
        if Options['debug'] :
            print >> sys.stderr, 'sdserver.rebuild:', make, utypes
        for utype in utypes:
            retval = self.compile(utype, dest_dir=self.site_web_dir+privatePrefix(utype)+'/'+utype, indexOnly=indexOnly, make=make)
            msgs = retval.get('messages',[])
            msg_dict[utype] = msgs
            if msgs:
                msg_list += msgs + ['']

        retval = self.compile(TOP_LEVEL, dest_dir=self.site_web_dir, indexOnly=False, make='')
        msgs = retval.get('messages',[])
        msg_dict[TOP_LEVEL] = msgs
        if msgs:
            msg_list += msgs

        return msg_dict if log_dict else msg_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号