首页 > 代码库 > 中国年

中国年

散打

class PushMainSiteCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        self.mySettings = setting.setting()

        if not self.doReloadHeaderConfig():
            sublime.status_message(u‘请确认博客配置,按 Shift+F6 生成配置。‘)
            return

        if self.mySettings.document_config[‘title‘] == u‘‘:
            sublime.status_message(u‘文章还没有设置标题,标题对应"title"字段‘)
            return

        self.contents  = self.view.substr(sublime.Region(0, self.view.size()));
        self.publish();

中国年