An idea for converting existing documents to text files with DokuWiki syntax using an HTML to Text converter. I've set up a config file for the tool available at http://www.mbayer.de/html2text/ which produces some usable results: text2html.rc.
pandoc -s -r html https://www.dokuwiki.org/tips:htmltowiki -t dokuwiki > tips.txt
Html2DokuWiki is a free HTML to DokuWiki converter for Win32 platforms. It is very simple to install and extremely easy to use. Just extract the executable from the archive, double-click to start, and Html2DokuWiki is ready to go.
To start converting, just type HTML into the upper edit. The converted DokuWiki syntax will immediately appear in the lower edit. Then select (CTRL+A
) the converted document and copy / paste it into any DokuWiki site. Larger HTML documents can also be pasted into the HTML input.
Click here to download Html2DokuWiki.
Supported HTML Elements
Html2DokuWiki converts all HTML elements currently supported by DokuWiki:
**
>
, including nested quotes\\
''
<del>
<DT>
as bold.======
to ==
//
<code>
**
//
**
<sub>
<sup>
align
and colspan
supportalign
and colspan
supportalign
support''
__
Special Features
:
style, external ones are left unchanged. mailto:
is removed from e-mail links.=== ... ===
and <code> ... </code>
, for example.Author, Contact, and Development
Html2DokuWiki is developed by Ralf Junker. You can contact the author via the Yunqa mailing list. Feel free to report praise, bugs, or suggestions about Html2DokuWiki.
The converter might also be available as a software library (*.DLL, *.DCU, or Delphi source code). Please get in touch if interested.
Version History
2007-08-27
//
to %%//%%
if part of an external URI.%%
to <nowiki>%%<nowiki>
.2007-10-22
<DL>
, <DT>
, and <DD>
. Simulate output as simple unnumbered lists with <DT>
as bold.%%
, <nowiki>
, and </nowiki>
and escape them properly.|
and ^
) when inside a table.((
, which starts a DokuWiki footnote.<PRE>
blocks.<P><PRE>one</PRE>two</P><BR>three
.<TBODY>
table problem where a new row did not output a linebreak.I was looking for a way to convert about 150 DOC-files (Microsoft Word2000 or 2003) in our new wiki without too much hassle.
The macros available didn't work for me.
Specifications
suggested workflow (works best IMO)
Is there a faster way (2009/07/18 by bobeck)
→ This is still the fastest and most reliable way (2014/09/24 by josh)
<html xmlns:n…>
to simple <html>… </html>
→ (2015/05/15 by qtrolazyg)
This will only work if the htmlok config setting was enabled. But that opens up a huge security risk. So, please use this approach only in closed wikis! Apart from that, the HTML that Word creates is awful… — Anika Henke 2015-03-15 18:42