<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>reST &#8211; 天地一沙鸥</title>
	<atom:link href="https://haoluobo.com/tag/rest/feed/" rel="self" type="application/rss+xml" />
	<link>https://haoluobo.com</link>
	<description>to be continue....</description>
	<lastBuildDate>Mon, 05 Jan 2009 15:43:12 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>整了个在线将reStructuredText转成html的东西</title>
		<link>https://haoluobo.com/2009/01/%e6%95%b4%e4%ba%86%e4%b8%aa%e5%9c%a8%e7%ba%bf%e5%b0%86restructuredtext%e8%bd%ac%e6%88%90html%e7%9a%84%e4%b8%9c%e8%a5%bf/</link>
		
		<dc:creator><![CDATA[vicalloy]]></dc:creator>
		<pubDate>Mon, 05 Jan 2009 15:43:12 +0000</pubDate>
				<category><![CDATA[vicalloy的庄家]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[reST]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<guid isPermaLink="false">/index.php/2009/01/%e6%95%b4%e4%ba%86%e4%b8%aa%e5%9c%a8%e7%ba%bf%e5%b0%86restructuredtext%e8%bd%ac%e6%88%90html%e7%9a%84%e4%b8%9c%e8%a5%bf/</guid>

					<description><![CDATA[现在不少python程序都是用reStructuredText写文档。 比较郁闷的是有部分文档都只提供了reS [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>现在不少python程序都是用reStructuredText写文档。    <br />比较郁闷的是有部分文档都只提供了reStructuredText的源文件，没有转换好的html文件。     <br />感觉自己每次手动转比较麻烦，于是花了点时间写了个在线的。     <br />将reStructuredText文件贴进去，提交后就可以看到转好的页面了。</p>
<p>现在还有点问题，sphinx对reStructuredText进行了扩展。    <br />对包含了sphinx标签的会处理出错（谁知道怎么忽略错误？）。     <br />地址是 <a href="http://rest.haoluobo.com/">http://rest.haoluobo.com/</a></p>
<p>程序的代码可是非常的少，主要代码就是下面几行。</p>
<p>#!/usr/bin/env python   <br /># -*- coding: UTF-8 -*-    <br />from django.http import HttpResponse    <br />from docutils.core import publish_string </p>
<p>def index(request):   <br />&#160;&#160; html = &quot;&quot;&quot;    <br />&lt;html&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;head&gt;&lt;/head&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;body&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;textarea name=&quot;rest&quot; cols=&quot;60&quot; rows=&quot;20&quot; onfocus=&quot;this.value=&#8221;&quot;&gt;&lt;/textarea&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;br/&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;input type=&quot;submit&quot; value=&quot;提交&quot;/&gt;    <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;/form&gt;    <br />&#160;&#160; &lt;/body&gt;    <br />&lt;/html&gt;    <br />&#160;&#160; &quot;&quot;&quot;    <br />&#160;&#160; if request.POST:    <br />&#160;&#160;&#160;&#160;&#160;&#160; html = publish_string(request.POST[&#8216;rest&#8217;], writer_name=&#8217;html&#8217;)    <br />&#160;&#160; return HttpResponse(html)</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
