<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>评论：插件发布：WP keyword Link Plugin（Wordpress内链外链插件）</title>
	<atom:link href="http://liucheng.name/789/feed/" rel="self" type="application/rss+xml" />
	<link>http://liucheng.name/789/</link>
	<description>努力在数据的海洋里畅游</description>
	<lastBuildDate>Fri, 12 Mar 2010 19:13:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：Wordpress与dokuwiki的深度整合 &#124; LazyHack</title>
		<link>http://liucheng.name/789/#comment-6742</link>
		<dc:creator>Wordpress与dokuwiki的深度整合 &#124; LazyHack</dc:creator>
		<pubDate>Fri, 12 Mar 2010 18:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6742</guid>
		<description>[...] 之前写过一篇WordPress与Dokuwiki的简单整合，今天在装Baidu Sitemap Generator时发现了WP Keyword Link这个插件，这个插件的基本功能就是为博客中的关键字添加内链跟外链，而在它的后台管理里面有倒入关键字连接的功能，这个对于我这样有博客有wiki的人来说简直太有用了，只要我能得到我wiki的关键字跟url那么我文章中的关键字可以直接链接到我的wiki中了。 那么怎么才能得到wiki的关键字链接呢，我肯定不会傻了吧唧的一个一个找然后一个一个添加了，对于dokuwiki这样的纯文本文件存储的wiki来说得到关键字的方法其实都不困难，大不了就是find它的data目录得到。出于懒的考虑我却不想自己动手写，于是就上官网看看有没有导出namespace的插件，结果在官网里外都找了要不是不能用要不就是达不到要求，虽然没找到，但是也有收获知道了它的xmlrpc有个wiki.getAllPages的功能，就是得到所有的面页以及面页的基本信息，这样就简单，起码写起python来要比shell高效多了。 # coding=&#039;utf-8&#039; import sys from urllib import urlencode import xmlrpclib &#160; #config WIKI = &#039;http://wiki.lazyhack.net&#039; #wiki的地址 USER = &#039;username&#039; #用户名 PWD = &#039;password&#039; #密码 KEYWORD_LEN = &#039;10&#039; #忽略过长的关键字 OUT_HEADER = &#039;Keyword,URL,NoFollow,First Only,New Window,Ignore Case,IsAffiliate,Enable In Comments,Chinese Keyword,Descriptionn&#039; #这个是导入文件的输出头，代码后解释意思 &#160; #out config 对应以上的输出头 keyword = &#039;&#039; url = &#039;&#039; nofillow = &#039;0&#039; firstonly = &#039;1&#039; new_win = &#039;1&#039; ignore = &#039;0&#039; isaffiliate = &#039;0&#039; incomment = &#039;0&#039; zh_word = &#039;1&#039; desc = &#039;&#039; &#160; rpc_url = WIKI + &quot;/lib/exe/xmlrpc.php?&quot; + urlencode&#40;&#123;&#039;u&#039;:USER,&#039;p&#039;:PWD&#125;&#41; print rpc_url rpc = xmlrpclib.ServerProxy&#40;rpc_url&#41; out = &#039;&#039; try: bool_str = &#039;%s,%s,%s,%s,%s,%s,%s&#039; % &#40;nofillow, firstonly, new_win, ignore, isaffiliate, incomment, zh_word&#41; pages = rpc.wiki.getAllPages&#40;&#41; for page in pages: name = page&#91;&#039;id&#039;&#93; keyword = name if name.find&#40;&#039;:&#039;&#41; &gt; 0: keyword = name.split&#40;&#039;:&#039;&#41;&#91;-1&#93; if len&#40;keyword&#41; &gt; KEYWORD_LEN: print &quot;???n&quot; continue url = &#039;%s/%s&#039; % &#40;WIKI, name&#41; desc = keyword #print keyword out = out + &#039;&quot;%s&quot;,&quot;%s&quot;,%s,&quot;%s&quot;n&#039; % &#40;keyword, url, bool_str, desc&#41; &#160; except xmlrpclib.Fault, err: print &quot;Error: %s&quot; % err sys.exit&#40;0&#41; file = open&#40;&#039;out_file.txt&#039;, &#039;w&#039;&#41; out = OUT_HEADER + out.encode&#40;&#039;utf8&#039;&#41; print out file.write&#40;out&#41; file.close&#40;&#41; [...]</description>
		<content:encoded><![CDATA[<p>[...] 之前写过一篇WordPress与Dokuwiki的简单整合，今天在装Baidu Sitemap Generator时发现了WP Keyword Link这个插件，这个插件的基本功能就是为博客中的关键字添加内链跟外链，而在它的后台管理里面有倒入关键字连接的功能，这个对于我这样有博客有wiki的人来说简直太有用了，只要我能得到我wiki的关键字跟url那么我文章中的关键字可以直接链接到我的wiki中了。 那么怎么才能得到wiki的关键字链接呢，我肯定不会傻了吧唧的一个一个找然后一个一个添加了，对于dokuwiki这样的纯文本文件存储的wiki来说得到关键字的方法其实都不困难，大不了就是find它的data目录得到。出于懒的考虑我却不想自己动手写，于是就上官网看看有没有导出namespace的插件，结果在官网里外都找了要不是不能用要不就是达不到要求，虽然没找到，但是也有收获知道了它的xmlrpc有个wiki.getAllPages的功能，就是得到所有的面页以及面页的基本信息，这样就简单，起码写起python来要比shell高效多了。 # coding=&#39;utf-8&#39; import sys from urllib import urlencode import xmlrpclib &nbsp; #config WIKI = &#39;http://wiki.lazyhack.net&#39; #wiki的地址 USER = &#39;username&#39; #用户名 PWD = &#39;password&#39; #密码 KEYWORD_LEN = &#39;10&#39; #忽略过长的关键字 OUT_HEADER = &#39;Keyword,URL,NoFollow,First Only,New Window,Ignore Case,IsAffiliate,Enable In Comments,Chinese Keyword,Descriptionn&#39; #这个是导入文件的输出头，代码后解释意思 &nbsp; #out config 对应以上的输出头 keyword = &#39;&#39; url = &#39;&#39; nofillow = &#39;0&#39; firstonly = &#39;1&#39; new_win = &#39;1&#39; ignore = &#39;0&#39; isaffiliate = &#39;0&#39; incomment = &#39;0&#39; zh_word = &#39;1&#39; desc = &#39;&#39; &nbsp; rpc_url = WIKI + &quot;/lib/exe/xmlrpc.php?&quot; + urlencode&#40;&#123;&#39;u&#39;:USER,&#39;p&#39;:PWD&#125;&#41; print rpc_url rpc = xmlrpclib.ServerProxy&#40;rpc_url&#41; out = &#39;&#39; try: bool_str = &#39;%s,%s,%s,%s,%s,%s,%s&#39; % &#40;nofillow, firstonly, new_win, ignore, isaffiliate, incomment, zh_word&#41; pages = rpc.wiki.getAllPages&#40;&#41; for page in pages: name = page&#91;&#39;id&#39;&#93; keyword = name if name.find&#40;&#39;:&#39;&#41; &gt; 0: keyword = name.split&#40;&#39;:&#39;&#41;&#91;-1&#93; if len&#40;keyword&#41; &gt; KEYWORD_LEN: print &quot;???n&quot; continue url = &#39;%s/%s&#39; % &#40;WIKI, name&#41; desc = keyword #print keyword out = out + &#39;&quot;%s&quot;,&quot;%s&quot;,%s,&quot;%s&quot;n&#39; % &#40;keyword, url, bool_str, desc&#41; &nbsp; except xmlrpclib.Fault, err: print &quot;Error: %s&quot; % err sys.exit&#40;0&#41; file = open&#40;&#39;out_file.txt&#39;, &#39;w&#39;&#41; out = OUT_HEADER + out.encode&#40;&#39;utf8&#39;&#41; print out file.write&#40;out&#41; file.close&#40;&#41; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Wordpress批量添加文字连接插件WP keyword Link Plugin &#124; 落伍美国主机评测</title>
		<link>http://liucheng.name/789/#comment-6654</link>
		<dc:creator>Wordpress批量添加文字连接插件WP keyword Link Plugin &#124; 落伍美国主机评测</dc:creator>
		<pubDate>Wed, 10 Mar 2010 10:07:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6654</guid>
		<description>[...] Plugin Homepage » http://liucheng.name/789/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Plugin Homepage » <a href="http://liucheng.name/789/" rel="nofollow">http://liucheng.name/789/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：jason</title>
		<link>http://liucheng.name/789/#comment-6651</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Wed, 10 Mar 2010 07:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6651</guid>
		<description>很不错的插件，我也试试</description>
		<content:encoded><![CDATA[<p>很不错的插件，我也试试</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：柳城</title>
		<link>http://liucheng.name/789/#comment-6525</link>
		<dc:creator>柳城</dc:creator>
		<pubDate>Sat, 06 Mar 2010 07:16:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6525</guid>
		<description>我也不懂CSS的啊。 你搜搜吧。</description>
		<content:encoded><![CDATA[<p>我也不懂CSS的啊。 你搜搜吧。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：笑望书</title>
		<link>http://liucheng.name/789/#comment-6510</link>
		<dc:creator>笑望书</dc:creator>
		<pubDate>Fri, 05 Mar 2010 12:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6510</guid>
		<description>[偷笑]我发现虽然显示的是“0”,但是还是在原来填的那个数字加链接，不过就是不能删除了，  以后还是不敢添加纯文字作关键词</description>
		<content:encoded><![CDATA[<p> <img src='http://liucheng.name/wp-includes/images/smilies/icon_tx.gif' alt='[偷笑]' class='wp-smiley' /> 我发现虽然显示的是“0”,但是还是在原来填的那个数字加链接，不过就是不能删除了，  以后还是不敢添加纯文字作关键词</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：zhangli</title>
		<link>http://liucheng.name/789/#comment-6494</link>
		<dc:creator>zhangli</dc:creator>
		<pubDate>Fri, 05 Mar 2010 07:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6494</guid>
		<description>初学水平不会css呀，多次试过加CSS的变化，就是调不出好的效果，箭头总是与关键词重叠，能不能请您帮忙给一个现成的CSS，先谢谢了。</description>
		<content:encoded><![CDATA[<p>初学水平不会css呀，多次试过加CSS的变化，就是调不出好的效果，箭头总是与关键词重叠，能不能请您帮忙给一个现成的CSS，先谢谢了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：柳城</title>
		<link>http://liucheng.name/789/#comment-6434</link>
		<dc:creator>柳城</dc:creator>
		<pubDate>Wed, 03 Mar 2010 04:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6434</guid>
		<description>你用CSS控制啊.有CSS样式的. CSS怎么弄我就不教了. 呵</description>
		<content:encoded><![CDATA[<p>你用CSS控制啊.有CSS样式的. CSS怎么弄我就不教了. 呵</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Zhangli</title>
		<link>http://liucheng.name/789/#comment-6428</link>
		<dc:creator>Zhangli</dc:creator>
		<pubDate>Wed, 03 Mar 2010 02:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.liucheng.name/?p=789#comment-6428</guid>
		<description>这个插件很好，我想在显示链接的文字后面增加一个箭头的小图标，就像以前的alinks一样，可是怎么加都达不到理想的效果，请帮助，谢谢</description>
		<content:encoded><![CDATA[<p>这个插件很好，我想在显示链接的文字后面增加一个箭头的小图标，就像以前的alinks一样，可是怎么加都达不到理想的效果，请帮助，谢谢</p>
]]></content:encoded>
	</item>
</channel>
</rss>
