old-www/wt2db/index.html

243 lines
10 KiB
HTML

<!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 &lt;para&gt;Foo&lt;/para&gt;</pre>
<pre>
=Title= &lt;sect1&gt;
&lt;title&gt;Title&lt;/title&gt;
&lt;/sect1&gt;</pre>
<pre>
=Title|id= &lt;sect1 id='id'&gt;
&lt;title&gt;Title&lt;/title&gt;
&lt;/sect1&gt;</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== &lt;sect2&gt;
&lt;title&gt;Title&lt;/title&gt;
&lt;/sect2&gt;</pre>
<pre>
===Title=== &lt;sect3&gt;
&lt;title&gt;Title&lt;/title&gt;
&lt;/sect3&gt;</pre>
<pre>
#Foo &lt;orderedlist&gt;
#Bar &lt;listitem&gt;
#Baz &lt;para&gt;Foo&lt;/para&gt;
/# &lt;/listitem&gt;
&lt;listitem&gt;
&lt;para&gt;Bar&lt;/para&gt;
&lt;/listitem&gt;
&lt;listitem&gt;
&lt;para&gt;Baz&lt;/para&gt;
&lt;/listitem&gt;
&lt;/orderedlist&gt;</pre>
<pre>
*Foo &lt;simplelist&gt;
*Bar &lt;listitem&gt;
*Baz &lt;para&gt;Foo&lt;/para&gt;
/* &lt;/listitem&gt;
&lt;listitem&gt;
&lt;para&gt;Bar&lt;/para&gt;
&lt;/listitem&gt;
&lt;listitem&gt;
&lt;para&gt;Baz&lt;/para&gt;
&lt;/listitem&gt;
&lt;/simplelist&gt;</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]] &lt;xref linkend='foo' linkterm='foo'/&gt;
[[link:Foo]]</pre>
<pre>
[[<a href="file:/etc/foo">file:/etc/foo</a>]] &lt;filename&gt;/etc/foo&lt;/filename&gt;</pre>
<pre>
[[dir:/etc]] &lt;filename class=&quot;directory&quot;&gt;/etc&lt;/filename&gt;</pre>
<pre>
[[dev:/dev/ttyS0]] &lt;filename class=&quot;devicefile&quot;&gt;/dev/ttyS0&lt;/filename&gt;</pre>
<pre>
[[<a href="http://foo.org">http://foo.org</a>]] &lt;ulink url='<a href="http://foo.org">http://foo.org</a>'&gt;
&lt;citetitle&gt;<a href="http://foo.org&lt;/citetitle&gt">http://foo.org&lt;/citetitle&gt</a>;
&lt;/ulink&gt;</pre>
<pre>
[[<a href="http://foo.org">http://foo.org</a> Foo]] &lt;ulink url='<a href="http://foo.org">http://foo.org</a>'&gt;
[[<a href="http://foo.org">http://foo.org</a>|Foo]] &lt;citetitle&gt;Foo&lt;/citetitle&gt;
&lt;/ulink&gt;</pre>
<pre>
[[<a href="ftp://foo.org">ftp://foo.org</a>]] &lt;ulink url='<a href="ftp://foo.org">ftp://foo.org</a>'&gt;
&lt;citetitle&gt;<a href="ftp://foo.org&lt;/citetitle&gt">ftp://foo.org&lt;/citetitle&gt</a>;
&lt;/ulink&gt;</pre>
<pre>
[[<a href="news://alt.foo.bar">news://alt.foo.bar</a>]] &lt;ulink url='<a href="news://alt.foo.bar">news://alt.foo.bar</a>'&gt;
&lt;citetitle&gt;alt.foo.bar&lt;/citetitle&gt;
&lt;/ulink&gt;</pre>
<pre>
'''Foo''' &lt;emphasis&gt;Foo&lt;/emphasis&gt;</pre>
<p>A few DocBook structures will not have &lt;para&gt; tags wrapped around them. They
are &lt;para&gt; itself, &lt;sect?&gt; and &lt;programlisting&gt;. If you insert anything
using these tags, no &lt;para&gt; tags will be wrapped around it or inserted into it.
So if you want fine control over your &lt;para&gt; tags, insert them yourself.</p>
<p>The &lt;screen&gt; element will be wrapped with &lt;para&gt; 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>