You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
242 lines
10 KiB
242 lines
10 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
<head> |
|
<title>wt2db</title> |
|
<link rev="made" href="mailto:root@localhost" /> |
|
</head> |
|
|
|
<body style="background-color: white"> |
|
|
|
<p><a name="__index__"></a></p> |
|
<!-- INDEX BEGIN --> |
|
|
|
<ul> |
|
|
|
<li><a href="#name">NAME</a></li> |
|
<li><a href="#synopsis">SYNOPSIS</a></li> |
|
<li><a href="#description">DESCRIPTION</a></li> |
|
<li><a href="#options">OPTIONS</a></li> |
|
<li><a href="#history">HISTORY</a></li> |
|
<li><a href="#notes">NOTES</a></li> |
|
<li><a href="#wikitext">WIKITEXT</a></li> |
|
<li><a href="#restrictions">RESTRICTIONS</a></li> |
|
<li><a href="#bugs">BUGS</a></li> |
|
<li><a href="#see_also">SEE ALSO</a></li> |
|
<li><a href="#author">AUTHOR</a></li> |
|
</ul> |
|
<!-- INDEX END --> |
|
|
|
<hr /> |
|
<p> |
|
</p> |
|
<h1><a name="name">NAME</a></h1> |
|
<p><strong>wt2db</strong> - converts WikiText documents into DocBook XML/SGML.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="synopsis">SYNOPSIS</a></h1> |
|
<p><strong>wt2db</strong> [<em>OPTION</em>] [<em>FILE</em>]</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="description">DESCRIPTION</a></h1> |
|
<p><strong>wt2db</strong> converts a text file in a special format similar to that used |
|
in WikiWikiWebs into DocBook XML/SGML. |
|
The DocBook it writes out by default is only |
|
a fragment, but it will write a complete document upon request.</p> |
|
<p>By default it reads from STDIN and writes to STDOUT. However, if given a |
|
filename, it will read that file, and an output filename can also be |
|
specified as a command-line option.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="options">OPTIONS</a></h1> |
|
<p><strong>-s</strong>, <strong>--sgml</strong> add SGML DOCTYPE and article tags.</p> |
|
<p><strong>-x</strong>, <strong>--xml</strong> add XML DOCTYPE and article tags.</p> |
|
<p><strong>-f</strong>, <strong>--faq</strong> make the article a FAQ.</p> |
|
<p><strong>-e</strong>, <strong>--encoding</strong> specify the document encoding.</p> |
|
<p><strong>-n</strong>, <strong>--nonet</strong> do not access the network.</p> |
|
<p><strong>-o</strong>, <strong>--output-to</strong> <em>filename</em> write to the specified file.</p> |
|
<p><strong>-V</strong>, <strong>--verbose</strong> show diagnostic output.</p> |
|
<p><strong>-v</strong>, <strong>--version</strong> show program version.</p> |
|
<p><strong>-h</strong>, <strong>--help</strong> show a usage message.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="history">HISTORY</a></h1> |
|
<p><strong>wt2db</strong> was originally developed to convert articles from the |
|
Wikipedia into DocBook for republishing at the LDP. |
|
As development proceeded, I realized that it could be used |
|
to provide an easier way to write DocBook documentation.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="notes">NOTES</a></h1> |
|
<p>WikiText is based on the form of text that is used in a |
|
WikiWikiWeb. It provides very simple and easy to remember |
|
tags so you can write a Wiki article without learning HTML. |
|
<strong>wt2db</strong> was originally written to convert Wikipedia articles |
|
into DocBook.</p> |
|
<p>The Wiki format has been enhanced in several ways to make it |
|
more powerful for authors. Support has been added for Wiki tags |
|
that don't exist in any real Wiki, by giving common DocBook |
|
elements their own Wiki tags. Support has also been added |
|
for including DocBook elements right in the source file.</p> |
|
<p>This means WikiText is a merging of DocBook into a plain text file. |
|
In in its simplest form, it is plain text. A plain text |
|
document can be processed by <strong>wt2db</strong> and converted into |
|
DocBook. |
|
Or, a complete and valid DocBook document can be processed, |
|
and will pass through the <strong>w2db</strong> filters and come out |
|
unchanged. |
|
Virtually any combination of DocBook with plain text will work, |
|
with the additional Wiki style tags to make things even easier |
|
for authors. |
|
It put all of the semantic of DocBook |
|
at your disposal, while being as easy to write as a Wiki page.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="wikitext">WIKITEXT</a></h1> |
|
<p>These are the tags which are supported in this release of |
|
<strong>wt2db</strong>. All DocBook tags are also supported. If you encounter |
|
any valid DocBook that is not handled correctly, please file |
|
a bug report.</p> |
|
<pre> |
|
Foo <para>Foo</para></pre> |
|
<pre> |
|
=Title= <sect1> |
|
<title>Title</title> |
|
</sect1></pre> |
|
<pre> |
|
=Title|id= <sect1 id='id'> |
|
<title>Title</title> |
|
</sect1></pre> |
|
<p>The id attribute, delimited with a pipe character, |
|
works for other sect levels as well, and many other |
|
tags. In some cases it is not an id value, but the |
|
title, depending on the semantics of the particular |
|
tag. Usage should be obvious in context.</p> |
|
<pre> |
|
==Title== <sect2> |
|
<title>Title</title> |
|
</sect2></pre> |
|
<pre> |
|
===Title=== <sect3> |
|
<title>Title</title> |
|
</sect3></pre> |
|
<pre> |
|
#Foo <orderedlist> |
|
#Bar <listitem> |
|
#Baz <para>Foo</para> |
|
/# </listitem> |
|
<listitem> |
|
<para>Bar</para> |
|
</listitem> |
|
<listitem> |
|
<para>Baz</para> |
|
</listitem> |
|
</orderedlist></pre> |
|
<pre> |
|
*Foo <simplelist> |
|
*Bar <listitem> |
|
*Baz <para>Foo</para> |
|
/* </listitem> |
|
<listitem> |
|
<para>Bar</para> |
|
</listitem> |
|
<listitem> |
|
<para>Baz</para> |
|
</listitem> |
|
</simplelist></pre> |
|
<p>Both ordered and unordered lists can be nested by increasing the number |
|
of ``#'' or ``*'' indicators, and ordered and unordered lists can also be |
|
nested inside each other. <strong>wt2db</strong> supports a depth of up to four |
|
itemized and/or four ordered lists. When nesting an itemized list |
|
inside another itemized list, or an ordered list inside an ordered list, |
|
repeat the ``#'' or ``*'' character to indicate the desired nesting level. |
|
When nesting an itemized list inside an ordered list or vice versa, |
|
it is not necessary to specify the depth, but it is recommended for clarity.</p> |
|
<pre> |
|
*Foo Nests one itemized list inside another. |
|
**Bar |
|
**Baz |
|
*Quux</pre> |
|
<pre> |
|
*Foo Nests an ordered list inside an itemized list. |
|
#Bar |
|
#Baz |
|
*Quux</pre> |
|
<pre> |
|
[[foo]] <xref linkend='foo' linkterm='foo'/> |
|
[[link:Foo]]</pre> |
|
<pre> |
|
[[<a href="file:/etc/foo">file:/etc/foo</a>]] <filename>/etc/foo</filename></pre> |
|
<pre> |
|
[[dir:/etc]] <filename class="directory">/etc</filename></pre> |
|
<pre> |
|
[[dev:/dev/ttyS0]] <filename class="devicefile">/dev/ttyS0</filename></pre> |
|
<pre> |
|
[[<a href="http://foo.org">http://foo.org</a>]] <ulink url='<a href="http://foo.org">http://foo.org</a>'> |
|
<citetitle><a href="http://foo.org</citetitle>">http://foo.org</citetitle></a>; |
|
</ulink></pre> |
|
<pre> |
|
[[<a href="http://foo.org">http://foo.org</a> Foo]] <ulink url='<a href="http://foo.org">http://foo.org</a>'> |
|
[[<a href="http://foo.org">http://foo.org</a>|Foo]] <citetitle>Foo</citetitle> |
|
</ulink></pre> |
|
<pre> |
|
[[<a href="ftp://foo.org">ftp://foo.org</a>]] <ulink url='<a href="ftp://foo.org">ftp://foo.org</a>'> |
|
<citetitle><a href="ftp://foo.org</citetitle>">ftp://foo.org</citetitle></a>; |
|
</ulink></pre> |
|
<pre> |
|
[[<a href="news://alt.foo.bar">news://alt.foo.bar</a>]] <ulink url='<a href="news://alt.foo.bar">news://alt.foo.bar</a>'> |
|
<citetitle>alt.foo.bar</citetitle> |
|
</ulink></pre> |
|
<pre> |
|
'''Foo''' <emphasis>Foo</emphasis></pre> |
|
<p>A few DocBook structures will not have <para> tags wrapped around them. They |
|
are <para> itself, <sect?> and <programlisting>. If you insert anything |
|
using these tags, no <para> tags will be wrapped around it or inserted into it. |
|
So if you want fine control over your <para> tags, insert them yourself.</p> |
|
<p>The <screen> element will be wrapped with <para> tags, but no internal |
|
paragraph breaks will be generated.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="restrictions">RESTRICTIONS</a></h1> |
|
<p>Currently only a single form of WikiText is supported, which is very |
|
similar to that used by the Wikipedia. See <a href="http://www.wikipedia.com">http://www.wikipedia.com</a> for |
|
more information on the Wikipedia.</p> |
|
<p>A future release will be configurable to support additional styles of |
|
WikiText.</p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="bugs">BUGS</a></h1> |
|
<p>Bugs are tracked along with Lampadas bugs in the Gnome Bugzilla |
|
repository. |
|
If you report a bug in <strong>wt2db</strong>, specify lampadas as the product |
|
and wt2db as the component, so it will be routed the appropriate person. |
|
You can do this quickly by visiting the following URL:</p> |
|
<p><a href="http://bugzilla.gnome.org/enter_bug.cgi?product=lampadas&component=wt2db">http://bugzilla.gnome.org/enter_bug.cgi?product=lampadas&component=wt2db</a></p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="see_also">SEE ALSO</a></h1> |
|
<p>See the home page of the Linux Documentation Project, |
|
<a href="http://www.tldp.org">http://www.tldp.org</a> for updates and more information. |
|
Also see the WikiText Editing HOWTO published by the LDP at |
|
<a href="http://www.tldp.org/HOWTO/WikiText-HOWTO/.">http://www.tldp.org/HOWTO/WikiText-HOWTO/.</a></p> |
|
<p> |
|
</p> |
|
<hr /> |
|
<h1><a name="author">AUTHOR</a></h1> |
|
<p>This man page was written by David C. Merrill, david -AT- lupercalia.net.</p> |
|
<p>Permission is granted to copy, distribute and/or modify this document under |
|
the terms of the GNU Free Documentation License, Version 1.1 or any later |
|
version published by the Free Software Foundation; with no Invariant Sections, |
|
no Front-Cover Texts and no Back-Cover Texts.</p> |
|
|
|
</body> |
|
|
|
</html>
|
|
|