一、首先到官网下载OLW:http://openlivewriter.org/javascript
二、选择 Other servicesphp
三、填写“博客地址”、“用户名”、“密码”css
四、“选择博客提供商” 和 “远程发布博客地址”html
五、博客提供商 为:Metaweblog APIjava
六、设置git
(1)选择博客github
(2)注册博客账户web
(3)下载博客主题 选 “否”编程
七、配置CSDN博客的链接windows
(1)开始配置
用户名:CSDN用户名
密码:CSDN登陆密码
(2)远程发布博客
(3)设置博客昵称
(4)配置完成
八、配置博客园的链接
(1)开始配置
用户名:博客园用户名
密码:博客园登陆密码
(2)远程发布博客 博客园用户名/services/metaweblog.aspx
(彷佛博客园不须要这个,跳过了这个步骤,但仍是贴出来,万一哪天又要了呢)
(3)设置博客昵称
(4)配置完成
九、配置网易博客的链接
(1)开始配置
博客地址:http://网易用户名.blog.163.com/
用户名:网易邮箱前缀(163邮箱才取前缀)
密码:网易登陆密码
(2)远程发布博客地址:http://os.blog.163.com/word/
(3)设置博客昵称
(4)配置完成
十、配置新浪博客的链接:
(1)开始配置
博客地址:http://blog.sina.com.cn/新浪博客用户名
用户名:新浪登陆账号
密码:新浪登陆密码
(2)远程发布博客地址:无(貌似也不须要,跳过这个步骤)
(3)设置博客昵称
(4)配置完成
十一、配置51CTO博客的链接
(1)开始配置
博客地址:http://51CTO用户名.blog.51cto.com/xmlrpc.php
用户名:51CTO用户名
密码:51CTO登陆密码
(2)远程发布博客地址:http://51CTO用户名.blog.51cto.com/xmlrpc.php
(3)设置博客昵称
(4)配置完成
十二、配置ChinaAET博客的链接
(1)开始配置
博客地址:http://blog.chinaaet.com/ChinaAET用户名
用户名:ChinaAET用户名
密码:ChinaAET登陆密码
(2)远程发布博客地址:http://blog.chinaaet.com/metaweblog.ashx
(3)设置博客昵称
(4)配置完成
1三、综合以下:
CSDN:
用户名:CSDN用户名
密码:CSDN登陆密码
远程发布博客地址
博客园:
用户名:博客园用户名
密码:博客园登陆密码
远程发布博客地址:无
网易博客:
博客地址:http://网易用户名.blog.163.com/
用户名:网易邮箱前缀(163邮箱才取前缀)
密码:网易登陆密码
远程发布博客地址:http://os.blog.163.com/word/
新浪博客:
博客地址:http://blog.sina.com.cn/新浪博客用户名
用户名:新浪登陆账号
密码:新浪登陆密码
远程发布博客地址:无
51CTO博客:
博客地址:http://51CTO用户名.blog.51cto.com/xmlrpc.php
用户名:51CTO用户名
密码:51CTO登陆密码
远程发布博客地址:http://51CTO用户名.blog.51cto.com/xmlrpc.php
ChinaAET博客:
博客地址:http://blog.chinaaet.com/ChinaAET用户名
用户名:ChinaAET用户名
密码:ChinaAET登陆密码
远程发布博客地址:http://blog.chinaaet.com/metaweblog.ashx
1四、全部链接一览:
1五、代码高亮插件:
此插件放入C:\Users\siwux\AppData\Local\OpenLiveWriter\app-0.6.0.0\Plugins
(这里的siwux是你电脑的用户名,若没有Plugins文件夹,就本身建立)
免积分 免下载豆 直接下载:
狡兔双窟其二:http://down.51cto.com/data/2271173
关于代码高亮插件:
(1):https://github.com/OpenLiveWriter/OpenLiveWriter
博客园内置支持SyntaxHighlighter代码着色,代码着色语法:<pre class='brush:编程语言'>代码</pre>。
须要注意的是:如何你使用SyntaxHighlighter代码着色,须要将默认编辑器改成TinyMCE。若是使用CuteEditor,CuteEditor会自动去除代码中的空格,形成代码格式破坏。
若是您使用Windows Live Writer写博客(配置步骤),经过Windows Live Writer代码着色插件,能够方便进行SyntaxHighlighter代码着色。
咱们推荐的代码着色插件是:Windows Live Writer Source Code plugin for SyntaxHighlighter
官方网址:http://sourcecodeplugin.codeplex.com/
本地下载:SourceCodePlugin_version_1.1.zip
安装方法:
将WindowsLiveWriter.SourceCode.dll复制到Windows Live Writer plugin文件夹:
* 32-bit systems: C:\Program Files\Windows Live\Writer\Plugins
* 64-bit systems: C:\Program Files (x86)\Windows Live\Writer\Plugins
使用方法:
安装成功以后,在Live Writer会出现“Source Code”插件,以下图:
点击该插件,粘贴须要着色的代码并选择相应的编程语言便可。
=================================================================================================================
Windows Live Writer在2012年就中止了更新,Open Live Writer(如下简称OLW)是由Windows Live WriterWriter改名而来,是由微软推出的一款可以无偿使用的博客写做软件,主要为用户提供博客在线撰写和编辑功能,相比Windows Live Writer,OLW首个版本仍然缺乏一些功能,不过团队已经制订了更新路线图,一些新功能会陆续推出。相信之后他将是一个写博客的好利器。
但从github源代码(https://github.com/OpenLiveWriter/OpenLiveWriter)来看,已经有9个月未更新了,而官网更是未见一个插件,“钱途”堪忧呀。
官网地址:http://openlivewriter.org/ 点击download下载:https://openlivewriter.azureedge.net/stable/Releases/OpenLiveWriterSetup.exe
(界面血漂亮)
默认安装到C:\Users\用户\AppData\Local\OpenLiveWriter目录,结构以下:
、
标红色的是OLW的主程序:
双击OpenLiveWriter.exe便可打开OLW编辑器:
做为一个开发人员,对代码进行着色是不可缺乏的,如何在OLW下实现插入代码并着色呢?
前奏:从cnblogs的官网获取,在windows live writer下,可用WindowsLiveWriter.CNBlogs.CodeHighlighter进行代码着色,是有有效的
实验:将WindowsLiveWriter.CNBlogs.CodeHighlighter.dll插件放到C:\Users\用户\AppData\Local\OpenLiveWriter\app-0.6.0.0\Plugins目录下,启动并未有见插件
分析:经过调试OLW的源码代码调试,加载插件出现异常;经过ILSpy分析WindowsLiveWriter.CNBlogs.CodeHighlighter.dll,以下图
WindowsLiveWriter.CNBlogs.CodeHighlighter.dll引用WindowsLive.Writer.Api,与现有OLW的新接口OpenLiveWriter.Api不匹配。
解决方案一:反编译WindowsLiveWriter.CNBlogs.CodeHighlighter.dll修改引用类库,将WindowsLive.Writer.Api.dll更改成OpenLiveWriter.Api.dll,不建议使用本方法。
解决方案二:因为是从Windows Live Writer Source Code plugin for SyntaxHighlighter(http://sourcecodeplugin.codeplex.com/)进行优化而来,能够从本开源项目进行优化。
封装编译以后的dll为:OpenLiveWriter.CNBlogs.SourceCode.dll,下载地址为:OpenLiveWriter.CNBlogs.SourceCode.zip
插件安装以后:
(1)原始项目下载地址:http://sourcecodeplugin.codeplex.com/SourceControl/latest
点击“download”下载,只需按照3.2修订WindowsLiveWriter.SourceCode项目编译。
(2)修改后的项目可从github下载:
https://github.com/zsy619/OpenLiveWriter.SourceCode,下载编辑便可使用。
(1)修改类库引用,WindowsLive.Writer.Api.dll更改成OpenLiveWriter.Api.dll(能够从OLW安装的目录下找到)
(2)修改输出地址:
OpenLiveWriter.CNBlogs.SourceCode类库输出地址:copy "$(TargetPath)" "C:\Users\xxtt\AppData\Local\OpenLiveWriter\app-0.6.0.0\Plugins"
(3)CodeForm窗体代码修订
修改Code属性:
public string Code { get { return this._code; } set { this._code = value; } }
新增博客园的远程代码着色方法(可参考WindowsLiveWriter.CNBlogs.CodeHighlighter.dll):
private string RemoteCodeHighlight() { string requestUriString = 'javascript:void(0)'; HttpWebRequest httpWebRequest = WebRequest.Create(requestUriString) as HttpWebRequest; httpWebRequest.Method = "POST"; httpWebRequest.ContentType = "application/x-www-form-urlencoded"; string value = string.Format("language={0}&code={1}", HttpUtility.UrlEncode(this.comboBrush.Text.Trim()), HttpUtility.UrlEncode(this.textCode.Text.Trim())); using (StreamWriter streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { streamWriter.Write(value); } string result; using (WebResponse response = httpWebRequest.GetResponse()) { using (StreamReader streamReader = new StreamReader(response.GetResponseStream())) { result = streamReader.ReadToEnd(); } } return result; }
修改buttonOK_Click方法:
private void buttonOK_Click(object sender, EventArgs e) { this._configDb.Config.Brush = this.comboBrush.Text; this._configDb.Config.MainFormX = base.Left; this._configDb.Config.MainFormY = base.Top; this._configDb.Config.MainFormWidth = base.Width; this._configDb.Config.MainFormHeight = base.Height; this._configDb.SavePluginConfigurationData(); try { this._code = this.RemoteCodeHighlight(); } catch (Exception exception) { MessageBox.Show(exception.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } base.DialogResult = DialogResult.OK; base.Close(); }
C#代码展现如上,目前CNBlogs官网接口还不支持go语言,有点遗憾,期待更新!
===============================================================================================================================
最新插件下载地址:Memento.OLW_V1.0.0.3.7z
1. 修正 cnblog 语法高亮中的 SQL、Perl 语法高亮异常
下载地址:Memento.OLW_V1.0.0.1.7z
1. 增长 cnblog 页签中 SQL 语法高亮的关键词连接选择;
下载地址:Memento.OLW_V1.0.0.2.7z
1. 修正Python语法高亮中单行注释颜色问题;
2. 修正Matlab语法高亮细节问题;
下载地址:Memento.OLW_V1.0.0.3.7z
01
02
<
link
type="text/css" rel="stylesheet" href='javascript:void(0)'>
<
script
type="text/javascript" src="http://files.cnblogs.com/files/memento/OLWPlugins.js"></
script
>
(图一)博客园网页端插入代码工具弹窗
/// <summary> /// 构造函数 /// </summary> /// <param name="settings">插件配置</param> /// <param name="content">文本内容</param> public CNBlogs(Settings settings, string content) { InitializeComponent(); try { m_Settings = settings; m_Content = content; m_HtmlParser = new HtmlParser(); chbCollapse.CheckedChanged += ChbCollapse_CheckedChanged; chbTAB.CheckedChanged += chbTAB_CheckedChanged; chbShowLineNum.CheckedChanged += ChbShowLineNum_CheckedChanged; Load += CNBlogs_Load; txtTAB.KeyPress += CommonHelper.NumberImput_KeyPress; } catch (Exception ex) { CommonHelper.ShowError(ex); } }
/// <summary> /// 构造函数 /// </summary> /// <param name="settings">插件配置</param> /// <param name="content">文本内容</param> public CNBlogs(Settings settings, string content) { InitializeComponent(); try { m_Settings = settings; m_Content = content; m_HtmlParser = new HtmlParser(); chbCollapse.CheckedChanged += ChbCollapse_CheckedChanged; chbTAB.CheckedChanged += chbTAB_CheckedChanged; chbShowLineNum.CheckedChanged += ChbShowLineNum_CheckedChanged; Load += CNBlogs_Load; txtTAB.KeyPress += CommonHelper.NumberImput_KeyPress; } catch (Exception ex) { CommonHelper.ShowError(ex); } }
-- 文件名为 module.lua -- 定义一个名为 module 的模块 module = {} -- 定义一个常量 module.constant = "这是一个常量" -- 定义一个函数 function module.func1() io.write("这是一个公有函数!\n") end local function func2() print("这是一个私有函数!") end function module.func3() func2() end return module Lua
x = [0:0.01:10]; y = sin(x); plot(x, y), xlabel('x'), ylabel('Sin(x)'), title('Sin(x) Graph'), grid on, axis equal
(图三)SyntaxHighlighter 主界面
(图四)SyntaxHighlighter 插件详细设置
/// <summary> /// 构造函数 /// </summary> /// <param name="settings">插件配置</param> /// <param name="content">文本内容</param> public CNBlogs(Settings settings, string content) { InitializeComponent(); try { m_Settings = settings; m_Content = content; m_HtmlParser = new HtmlParser(); chbCollapse.CheckedChanged += ChbCollapse_CheckedChanged; chbTAB.CheckedChanged += chbTAB_CheckedChanged; chbShowLineNum.CheckedChanged += ChbShowLineNum_CheckedChanged; Load += CNBlogs_Load; txtTAB.KeyPress += CommonHelper.NumberImput_KeyPress; } catch (Exception ex) { CommonHelper.ShowError(ex); } }
(图五)FoldRegion 主界面
● 标题展开