Python Lightweight Markup Languages
Background Information
A markup language is a modern system for annotating a text in a way
that is syntactically distinguishable from that text. The idea and
terminology evolved from the "marking up" of manuscripts, i.e. the
revision instructions by editors, traditionally written with a blue
pencil on authors' manuscripts. Examples are typesetting instructions
such as those found in troff and LaTeX, and structural markers such as
XML tags. Markup is typically omitted from the version of the text
which is displayed for end-user consumption. Some markup languages,
like HTML have presentation semantics, meaning their specification
prescribes how the structured data is to be presented, but other
markup languages, like XML, have no predefined semantics.
-- Wikipedia
A lightweight markup language is a markup language with a simple
syntax, designed to be easy for a human to enter with a simple text
editor, and easy to read in its raw form.
Lightweight markup languages are used in applications where people
might be expected to read the document source as well as the rendered
output. For instance, a person downloading a software library might
prefer to read the documentation in a text editor rather than a
browser.
-- Wikipedia
Why Not HTML?
Unfortunately, HTML is a pretty crappy markup language. Not only is
it a bit hard to read and write, but it's overly complicated for most
purposes. To that end, I'm looking for something simpler and easier
to use that gets converted to HTML.
Related Work
The
Wikipedia entry for lightweight markup languages
has a nice feature comparison matrix.
Comparison
Your choices appear to be (in roughly descending order of popularity):
The name appears to be a play on words; it is the opposite of "markup".
- PHP, Java, Perl, Python, C#, JavaScript
- Wikipedia entry
- Readability emphasized above all else
- influenced by
Setext
atx
Textile
ReStructuredText
GrutaText
EtText
- however, most similar to plain text email
- syntax is entirely of punctuation characters
- can easily inline HTML if markdown doesn't support something
- automatic HTML escaping
- supports two types of headers, Setext style (which is underlining and only can go two levels deep (or three, I can't tell)), and atx style (can go levels 1-6)
- blockquoting just like email quoting (prefix with >)
- EMACS mode and VIM modes available
- NO TABLE SUPPORT (except by embedding HTML, whose syntax for tables is seriously evil)
- automatic email address obfuscation
- only converts directly to HTML
- can convert to RTF using pandoc
- can convert to PDF via HTML using htmldoc markuku
- most tools (and EMACS mode) available in ubuntu package repository
- integrated with Django (framework), PyBloxsom (blog)
- does not create full HTML pages, only the body
- does not have a way to make internal references, hyperlink targets, or table of contents
- the version in the Ubuntu repositories does not appear to do nested lists but the dingus online can
- PHP, Java, Perl, Python, Ruby, ASP, C#
- Wikipedia entry
- EMACS mode and VIM modes available
- used by ruby community a lot
- most similar to HTML, least readable source
- easy nested lists
- not understandable to laypeople
- good for short documents
- basic tool available in ubuntu package repository
- python-based
- Wikipedia entry
- what-you-see-is-what-you-get
- used by docutils which can convert it to HTML or LaTeX
- meant for python docstrings
- reinterpretation of StructuredText and Setext
- whitespace-sensitive, much like python
- has two ways to include literals, one way to include images
- appears to work well in EMACS, in other editors, not so well
- works well when inserting program code
- directly converts to PDF and XML
- ideal for documents with lots of prose (e.g. alternative to docbook)
- can do internal cross-references
- only format which can build a table of contents
- language specification can be fairly intimidating, but the quick reference is fairly clear
- lists and paragraphs can interact in weird ways
- lots of tools in ubuntu package repository
- python-based
- whitespace-sensitive
- similar to markdown
- two ways of doing preformatted text
- code, images, tables, sections, references, terms, quotes, multi-level lists, etc.
- can embed HTML and XML if you want
- easily embeddable - HTML can be used to re-generate kiwi source
- good for wikis
- good feature-comparison with markdown, if you're interested, on the website
- does not appear in ubuntu package repository