Html2txt: Difference between revisions
m (→Motivation) |
|||
Line 29: | Line 29: | ||
=== Command line tool === | === Command line tool === | ||
see [html2txt.unkrig.de/Main.main.html here]. | |||
=== ANT task === | === ANT task === |
Revision as of 07:54, 11 May 2015
A tool to convert HTML documents into plain text.
For example this HTML code
is rendered like this:
For a complete description of the supported HTML inline elements, see here.
For a complete description of the supported HTML block elements, see here.
Motivation
The goal was to generate the "usage" page that a command line tool usually prints when you invoke it with a "-help" or "--help" option, rather than maintain it manually (e.g. in the form of "println()" statements in the code).
The chosen solution is to put a big DOC comment before the "main()" method, generate an HTML page with JAVADOC, convert that into a plain text file, put it into the application's JAR file and copy its contents to STDOUT when the user want to see it.
The command line version of html2txt itself uses that technique, and you can see the results above.
Download
You can download the latest and all older versions here; the change log is available here.
Usage
Command line tool
see [html2txt.unkrig.de/Main.main.html here].
ANT task
Library
License
html2txt/code> is published under the "New BSD License".
Contact
If you have issues, don't hesitate to submit a ticket.
To discuss in public, check the forum and/or subscribe to it (envelope icon).