重构文本工具支持

发布于 2024-08-30 18:16:09 字数 690 浏览 5 评论 0 原文

我是 reStructuredText 的忠实粉丝,但是支持它的工具分散在 Internet 上。 官方工具列表不完整和/或过时,只能通过以下方式更新提交权限。一段时间以来,维基百科 reStructuredText 页面上有一个完整的列表,但这显然是“不符合网页内容的知名度指南" 和 已删除

因此,以问题形式表述:在使用 reStructuredText 时可以期望找到哪些工具支持,例如文本编辑器、Wiki 软件、reStructuredText 之间的转换器等?

I am a great fan of reStructuredText, however the tools that support it are scattered all over the Internet. The official tool list is incomplete and/or outdated, and can be updated only via commit privileges. For some time there was a comprehensive list at the Wikipedia reStructuredText page, but this apparently "did not meet the notability guideline for web content" and was removed.

So to put it in a question form: What tool support can one expect to find when working with reStructuredText, e.g. text editors, Wiki software, converters to and from reStructuredText etc.?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

会发光的星星闪亮亮i 2024-09-06 18:16:09

从旧版本的维基百科中抢救(并扩展)列表页面:

文档

实现

虽然 reStructuredText 的参考实现是用 Python 编写的,但也有其他语言的 reStructuredText 解析器。

Python - Docutils

reStructuredText 的主要发行版是 Python Docutils 包。它包含几个转换工具:

  • rst2html - 从 reStructuredText 到 HTML
  • rst2xml - 从 reStructuredText 到 XML
  • rst2latex - 从 reStructuredText 到 LaTeX
  • rst2odt - 从 reStructuredText 到 LaTeX ODF 文本(文字处理程序)文档。
  • rst2s5 - 从 reStructuredText 到 S5,一个基于简单标准的幻灯片放映系统
  • rst2man - 从 reStructuredText 到手册页

Haskell - Pandoc

Pandoc 是一个用于从一种标记格式转换为另一种标记格式的 Haskell 库,以及使用该库的命令行工具。它可以读取 Markdown 和 reStructuredText、HTML 和 LaTeX(的子集),并且可以编写 Markdown、reStructuredText、HTML、LaTeX、ConTeXt、PDF、RTF、DocBook XML、OpenDocument XML、ODT、GNU Texinfo、MediaWiki 标记、groff man页面和 S5 HTML 幻灯片。

有一个Pandoc在线工具(POT)来尝试这个库。不幸的是,与 reStructuredText 在线渲染器 (ROR) 相比,

  • POT 截断输入的时间相当短。 POT 用户必须以块的形式呈现输入,这些块可以由 ROR 整体呈现。
  • POT 输出缺少 ROR 显示的有用错误消息(由 docutils 生成)

Java - JRst

JRst 是一个 Java reStructuredText 解析器。它当前可以输出 HTML、XHTML、DocBook xdoc 和 PDF,但似乎存在严重问题:使用当前完整下载,PDF 或 (X)HTML 生成均无法工作,(X)HTML 中的结果页面为空,并且 PDF 生成在 IO 上失败XSL 文件的问题(未捆绑?)。请注意,原始 JRst 已从网站中删除; 在 GitHub 上找到了一个分叉

Scala - Laika

Laika 是一个用于将标记语言转换为其他输出格式的新库。目前它支持来自 Markdown 和 reStructuredText 的输入并生成 HTML 输出。该库是用 Scala 编写的,但也应该可以在 Java 中使用。

Perl

PHP

C#/.NET

Nim/C

Nim 编译器 具有命令 rst2htmlrst2tex 将 reStructuredText 文件转换为 HTML 和 TeX 文件。标准库提供以下模块(由编译器使用)以编程方式处理 reStructuredText 文件:

其他第 3 方转换器

大多数(但不是全部) )这些工具基于 Docutils(见上文),并提供主发行版可能不支持的格式之间的转换。

来自 reStructuredText

  • restview - 此 pip 可安装的 python 包需要 docutils,它执行实际的渲染。 restview 的主要易用性功能是,当您保存对文档的更改时,它会自动重新呈现并重新显示它们。休息视图
    1. 启动一个小型网络服务器
    2. 调用 docutils 将文档呈现为 HTML
    3. 调用您设备的浏览器来显示输出 HTML。
  • rst2pdfrinohtype - 从 reStructuredText 到 PDF
  • rst2odp - 从 reStructuredText 到 ODF 演示文稿
  • rst2beamer - 从 reStructuredText 到 LaTeX beamer 演示文稿类
  • Wikir - 从 reStructuredText 到 Google(可能还有其他)Wiki 格式
  • rst2qhc - 将 reStructuredText 文件集合转换为 Qt(工具包)帮助文件和(可选)Qt 帮助项目文件

到 reStructuredText

  • xml2rst 是一个 XSLT 脚本,用于将 Docutils 内部 XML 表示(返回)转换为 reStructuredText
  • Pandoc (见上文)还可以从 Markdown、HTML 和 LaTeX 转换为 reStructuredText
  • db2rst 是一个简单且有限的 DocBook到 reStructuredText 翻译器
  • pod2rst - 转换 . pod 文件到 reStructuredText 文件

扩展

某些项目使用 reStructuredText 作为构建的基线,或提供扩展 reStructuredText 工具实用性的额外功能。

Sphinx

Sphinx 文档生成器将一组 reStructuredText 源文件转换为各种输出格式,自动生成交叉引用,索引等。rest2web

rest2web 是一个简单的工具,可让您从单个模板(或任意数量),并将内容保留在 reStructuredText 中。

Pygments

Pygments 是一个通用语法荧光笔,一般用于各种软件,例如论坛系统、Wiki 或其他应用程序需要美化源代码。请参阅在 reStructuredText 文档中使用 Pygments

免费编辑器

虽然任何纯文本编辑器都适合编写reStructuredText文档,有些编辑比其他编辑得到更好的支持。

Emacs

通过 rst-mode 的 Emacs 支持 是 Docutils 包的一部分,位于/docutils/tools/editors/emacs/rst.el

Vim

大多数 GNU/Linux 发行版附带的 vim-common 软件包具有 reStructuredText 语法突出显示和 reStructuredText 缩进支持开箱即用:

Jed

有一个 第一模式 用于Jed 程序员编辑器。

gedit

gedit,GNOME 桌面环境的官方文本编辑器。有一个 gedit reStructuredText 插件

Geany

Geany,一个小型轻量级集成开发环境,包括对 版本 0.12(2007 年 10 月 10 日)。

Leo

Leo,程序员的大纲编辑器,通过 rst-plugin 或通过“@auto-rst”节点(没有详细记录,但 @auto-rst节点允许直接编辑第一个文件,将结构解析为 Leo 轮廓)。

它还提供了一种在“viewrendered”窗格中预览生成的 HTML 的方法。

FTE

FTE 折叠文本编辑器 - 面向开发人员的免费(根据 GNU GPL 许可)文​​本编辑器。
FTE 一个模式 用于 reStructuredText 支持。它提供基本 RSTX 元素的颜色突出显示和特殊菜单,提供将最流行的 RSTX 元素插入文档的简单方法。

PyK

PyK 是 PyEdit 和 reStInPeace 的继承者,在 Qt4 工具包的帮助下用 Python 编写。

Eclipse

带有 ReST Editor 插件 的 Eclipse IDE 提供对编辑 reStructuredText 文件的支持。

NoTex

NoTex 是一个基于浏览器的(通用)文本编辑器,具有集成的项目管理和语法突出显示。此外,它还可以使用 rST 编写书籍、报告、文章等,并将它们转换为 LaTex、PDF 或 HTML。 PDF 文件具有较高的出版质量,并通过 Sphinx 和 Texlive LaTex 套件生成。

Notepad++

Notepad++ 是 Windows 通用文本编辑器。它内置了许多语言的语法突出显示,并通过用户定义的 reStructuredText 语言支持 reStructuredText 。

Visual Studio Code

Visual Studio Code 是适用于 Windows/macOS/Linux 的通用文本编辑器。它内置了许多语言的语法突出显示,并通过扩展支持reStructuredText来自 LeXtudio

专用的 reStructuredText 编辑器

专有编辑器

Sublime Text

Sublime Text 是一个完全可定制和可扩展的源代码编辑器,适用于 Windows、OS X 和 Linux。长期使用需要注册,但未注册版本可使用所有功能,偶尔会提醒购买许可证。版本 23(目前处于测试阶段)默认支持 reStructuredText 语法高亮,并且可以通过包管理器使用多个插件包Control 提供代码片段和代码补全、附加语法突出显示、RST 和其他格式之间的转换以及浏览器中的 HTML 预览。

BBEdit / TextWrangler

BBEdit (及其免费变体 TextWrangler) for Mac 可以使用此 无代码语​​言模块

TextMate

TextMate 是 Mac OS X 专有的通用 GUI 文本编辑器,具有 reStructuredText 捆绑包

Intype

Intype 是 Windows 专有的文本编辑器,支持开箱即用的 reStructuredText。

E 文本编辑器

E 是根据“开放公司许可证”获得许可的专有文本编辑器。它支持 TextMate 的捆绑包,因此它应该像 TextMate 一样支持 reStructuredText。

PyCharm

PyCharm(以及其他 IntelliJ 平台 IDE?)具有 ReST/Sphinx 支持(语法突出显示、自动完成和预览)。“即时预览”

Wiki

这里有一些支持 reStructuredText 标记作为本机标记语法或作为附加组件的 Wiki 程序:

MediaWiki

MediaWiki reStructuredText 扩展 允许在 MediaWiki< 中使用 reStructuredText 标记/a> 被 包围。

MoinMoin

MoinMoin 是一个先进、易于使用且可扩展的 WikiEngine,拥有庞大的用户社区。简而言之,这是关于在易于编辑的网页上进行协作。

有一个MoinMoin 的reStructuredText 解析器

Trac

Trac 是一个用于软件开发项目的增强型 wiki 和问题跟踪系统。
Trac 中有一个 reStructuredText 支持

本 Wiki

本 Wiki 是由 Ian Bicking 编写的 Python Wiki 的 Webware。该 wiki 使用 ReStructuredText 作为其标记。

rstiki

rstiki 是一个极简单文件个人 wiki,使用 reStructuredText 语法(通过 docutils),灵感来自于 pwyky。它不支持作者身份指示、版本控制、层次结构、镶边/框架/模板或样式。它利用 docutils/reStructuredText 作为 wiki 语法。因此,它的代码少于 200 行,并且位于一个文件中。您将其放入目录中并运行。

ikiwiki

Ikiwiki 是一个 wiki 编译器。它将 wiki 页面转换为适合在网站上发布的 HTML 页面。 Ikiwiki 将页面和历史记录存储在 Subversion 或 Git 等版本控制系统中。还有许多其他功能,包括对博客的支持以及大量插件。然而,它的 reStructuredText 插件有一定的局限性,目前不建议作为其主要标记语言。

Web 服务

预览

片段、在线 reStructuredText 编辑器 可用于处理标记并立即查看结果。

博客框架

WordPress

适用于 WordPress 的 WordPreSt reStructuredText 插件。 (PHP)

Zine

reStructuredText 解析器插件,适用于 Zine(当 Zine 计划获得本机 reStructuredText 支持时,将在 0.2 版中过时)。杂志已停产。 (Python)

pelican

Pelican 是一个静态博客生成器,支持在 ReST 中撰写文章。 (Python)

hyde

Hyde 是一个支持 ReST 的静态网站生成器。 (Python)

Acrylamid

Acrylamid 是一个静态博客生成器,支持在 ReST 中撰写文章。 (Python)

Nikola

Nikola 是一个支持 ReST 的静态站点和博客生成器。 (Python)

ipsum Genera

Ipsum Genera 是一个用 Nim 编写的静态博客生成器。

Yozuch

Yozuch 是一个用 Python 编写的静态博客生成器。

更多

Salvaging (and extending) the list from an old version of the Wikipedia page:

Documentation

Implementations

Although the reference implementation of reStructuredText is written in Python, there are reStructuredText parsers in other languages too.

Python - Docutils

The main distribution of reStructuredText is the Python Docutils package. It contains several conversion tools:

  • rst2html - from reStructuredText to HTML
  • rst2xml - from reStructuredText to XML
  • rst2latex - from reStructuredText to LaTeX
  • rst2odt - from reStructuredText to ODF Text (word processor) document.
  • rst2s5 - from reStructuredText to S5, a Simple Standards-based Slide Show System
  • rst2man - from reStructuredText to Man page

Haskell - Pandoc

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read Markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write Markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki markup, groff man pages, and S5 HTML slide shows.

There is an Pandoc online tool (POT) to try this library. Unfortunately, compared to the reStructuredText online renderer (ROR),

  • POT truncates input rather more shortly. The POT user must render input in chunks that could be rendered whole by the ROR.
  • POT output lacks the helpful error messages displayed by the ROR (and generated by docutils)

Java - JRst

JRst is a Java reStructuredText parser. It can currently output HTML, XHTML, DocBook xdoc and PDF, BUT seems to have serious problems: neither PDF or (X)HTML generation works using the current full download, result pages in (X)HTML are empty and PDF generation fails on IO problems with XSL files (not bundled??). Note that the original JRst has been removed from the website; a fork is found on GitHub.

Scala - Laika

Laika is a new library for transforming markup languages to other output formats. Currently it supports input from Markdown and reStructuredText and produce HTML output. The library is written in Scala but should be also usable from Java.

Perl

PHP

C#/.NET

Nim/C

The Nim compiler features the commands rst2htmland rst2tex which transform reStructuredText files to HTML and TeX files. The standard library provides the following modules (used by the compiler) to handle reStructuredText files programmatically:

  • rst - implements a reStructuredText parser
  • rstast - implements an AST for the reStructuredText parser
  • rstgen - implements a generator of HTML/Latex from reStructuredText

Other 3rd party converters

Most (but not all) of these tools are based on Docutils (see above) and provide conversion to or from formats that might not be supported by the main distribution.

From reStructuredText

  • restview - This pip-installable python package requires docutils, which does the actual rendering. restview's major ease-of-use feature is that, when you save changes to your document(s), it automagically re-renders and re-displays them. restview
    1. starts a small web server
    2. calls docutils to render your document(s) to HTML
    3. calls your device's browser to display the output HTML.
  • rst2pdf or rinohtype - from reStructuredText to PDF
  • rst2odp - from reStructuredText to ODF Presentation
  • rst2beamer - from reStructuredText to LaTeX beamer Presentation class
  • Wikir - from reStructuredText to a Google (and possibly other) Wiki formats
  • rst2qhc - Convert a collection of reStructuredText files into a Qt (toolkit) Help file and (optional) a Qt Help Project file

To reStructuredText

  • xml2rst is an XSLT script to convert Docutils internal XML representation (back) to reStructuredText
  • Pandoc (see above) can also convert from Markdown, HTML and LaTeX to reStructuredText
  • db2rst is a simple and limited DocBook to reStructuredText translator
  • pod2rst - convert .pod files to reStructuredText files

Extensions

Some projects use reStructuredText as a baseline to build on, or provide extra functionality extending the utility of the reStructuredText tools.

Sphinx

The Sphinx documentation generator translates a set of reStructuredText source files into various output formats, automatically producing cross-references, indices etc.

rest2web

rest2web is a simple tool that lets you build your website from a single template (or as many as you want), and keep the contents in reStructuredText.

Pygments

Pygments is a generic syntax highlighter for general use in all kinds of software such as forum systems, Wikis or other applications that need to prettify source code. See Using Pygments in reStructuredText documents.

Free Editors

While any plain text editor is suitable to write reStructuredText documents, some editors have better support than others.

Emacs

The Emacs support via rst-mode comes as part of the Docutils package under /docutils/tools/editors/emacs/rst.el

Vim

The vim-common package for that comes with most GNU/Linux distributions has reStructuredText syntax highlight and indentation support of reStructuredText out of the box:

Jed

There is a rst mode for the Jed programmers editor.

gedit

gedit, the official text editor of the GNOME desktop environment. There is a gedit reStructuredText plugin.

Geany

Geany, a small and lightweight Integrated Development Environment include support for reStructuredText from version 0.12 (October 10, 2007).

Leo

Leo, an outlining editor for programmers, supports reStructuredText via rst-plugin or via "@auto-rst" nodes (it's not well-documented, but @auto-rst nodes allow editing rst files directly, parsing the structure into the Leo outline).

It also provides a way to preview the resulting HTML, in a "viewrendered" pane.

FTE

The FTE Folding Text Editor - a free (licensed under the GNU GPL) text editor for developers.
FTE has a mode for reStructuredText support. It provides color highlighting of basic RSTX elements and special menu that provide easy way to insert most popular RSTX elements to a document.

PyK

PyK is a successor of PyEdit and reStInPeace, written in Python with the help of the Qt4 toolkit.

Eclipse

The Eclipse IDE with the ReST Editor plug-in provides support for editing reStructuredText files.

NoTex

NoTex is a browser based (general purpose) text editor, with integrated project management and syntax highlighting. Plus it enables to write books, reports, articles etc. using rST and convert them to LaTex, PDF or HTML. The PDF files are of high publication quality and are produced via Sphinx with the Texlive LaTex suite.

Notepad++

Notepad++ is a general purpose text editor for Windows. It has syntax highlighting for many languages built-in and support for reStructuredText via a user defined language for reStructuredText.

Visual Studio Code

Visual Studio Code is a general purpose text editor for Windows/macOS/Linux. It has syntax highlighting for many languages built-in and supports reStructuredText via an extension from LeXtudio.

Dedicated reStructuredText Editors

Proprietary editors

Sublime Text

Sublime Text is a completely customizable and extensible source code editor available for Windows, OS X, and Linux. Registration is required for long-term use, but all functions are available in the unregistered version, with occasional reminders to purchase a license. Versions 2 and 3 (currently in beta) support reStructuredText syntax highlighting by default, and several plugins are available through the package manager Package Control to provide snippets and code completion, additional syntax highlighting, conversion to/from RST and other formats, and HTML preview in the browser.

BBEdit / TextWrangler

BBEdit (and its free variant TextWrangler) for Mac can syntax-highlight reStructuredText using this codeless language module.

TextMate

TextMate, a proprietary general-purpose GUI text editor for Mac OS X, has a bundle for reStructuredText.

Intype

Intype is a proprietary text editor for Windows, that support reStructuredText out of the box.

E Text Editor

E is a proprietary Text Editor licensed under the "Open Company License". It supports TextMate's bundles, so it should support reStructuredText the same way TextMate does.

PyCharm

PyCharm (and other IntelliJ platform IDEs?) has ReST/Sphinx support (syntax highlighting, autocomplete and preview).instant preview)

Wiki

here are some Wiki programs that support the reStructuredText markup as the native markup syntax, or as an add-on:

MediaWiki

MediaWiki reStructuredText extension allows for reStructuredText markup in MediaWiki surrounded by <rst> and </rst>.

MoinMoin

MoinMoin is an advanced, easy to use and extensible WikiEngine with a large community of users. Said in a few words, it is about collaboration on easily editable web pages.

There is a reStructuredText Parser for MoinMoin.

Trac

Trac is an enhanced wiki and issue tracking system for software development projects.
There is a reStructuredText Support in Trac.

This Wiki

This Wiki is a Webware for Python Wiki written by Ian Bicking. This wiki uses ReStructuredText for its markup.

rstiki

rstiki is a minimalist single-file personal wiki using reStructuredText syntax (via docutils) inspired by pwyky. It does not support authorship indication, versioning, hierarchy, chrome/framing/templating or styling. It leverages docutils/reStructuredText as the wiki syntax. As such, it's under 200 lines of code, and in a single file. You put it in a directory and it runs.

ikiwiki

Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages suitable for publishing on a website. Ikiwiki stores pages and history in a revision control system such as Subversion or Git. There are many other features, including support for blogging, as well as a large array of plugins. Its reStructuredText plugin, however is somewhat limited and is not recommended as its' main markup language at this time.

Web Services

Preview

The Snippets, online reStructuredText editor can be used to play with the markup and see the results immediately.

Blogging frameworks

WordPress

WordPreSt reStructuredText plugin for WordPress. (PHP)

Zine

reStructuredText parser plugin for Zine (will become obsolete in version 0.2 when Zine is scheduled to get a native reStructuredText support). Zine is discontinued. (Python)

pelican

Pelican is a static blog generator that supports writing articles in ReST. (Python)

hyde

Hyde is a static website generator that supports ReST. (Python)

Acrylamid

Acrylamid is a static blog generator that supports writing articles in ReST. (Python)

Nikola

Nikola is a Static Site and Blog Generator that supports ReST. (Python)

ipsum genera

Ipsum genera is a static blog generator written in Nim.

Yozuch

Yozuch is a static blog generator written in Python.

More

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文